/*
 * Locemail — the look, layered on Roundcube's elastic skin.
 *
 * Elastic's own stylesheet loads first and this one overrides it, selector for selector.
 * Nothing here hides a control elastic draws: when a rule misses after a Roundcube
 * upgrade, the page falls back to elastic's look, not to a missing button.
 *
 * Tokens come from the approved mock-ups (webmail-design, 22 Oct 2026): lilac page,
 * purple navigation, cream cards, soft "clay" shadows, Nunito, 44 px touch targets.
 *
 * Font: Nunito (SIL Open Font License 1.1, fonts/OFL.txt), from google/fonts
 * ofl/nunito/Nunito[wght].ttf, subset to Latin + Latin Extended as a variable woff2
 * (weights 200–1000). nunito-800-icons.ttf is the same font pinned to weight 800 and
 * cut down to ASCII; GD uses it to draw the app icons. Served from this plugin — no
 * font CDN is contacted at runtime.
 */

@font-face {
    font-family: 'Nunito';
    src: url('../../fonts/nunito-var.woff2') format('woff2');
    font-weight: 200 1000;
    font-style: normal;
    font-display: swap;
}

/*
 * Light only, everywhere. Locemail has one palette, so the page tells the browser so:
 * "only light" also stops Chrome's automatic dark theme (Android "dark theme for web
 * pages", desktop force-dark) from inverting the cream cards while leaving the purple
 * navigation alone, which produced light text on light cards and dark text on dark ones.
 */
:root,
html.dark-mode {
    color-scheme: only light;
}

:root {
    --lm-page: #c9b6f5;
    --lm-nav: #6a49c9;
    --lm-nav-text: #e8e0fc;
    /* White on the primary is 5.3:1 (was #8b6ee8, 3.8:1 — below WCAG AA for button text). */
    --lm-primary: #7354d6;
    --lm-primary-edge: #553a9f;
    --lm-primary-hover: #6847cc;
    --lm-card: #fdf6f4;
    --lm-card-2: #faf6fe;
    --lm-field: #e9e1fb;
    --lm-soft: #e8e0fc;
    --lm-soft-edge: #bda6f4;
    --lm-softer: #f4f0fe;
    --lm-text: #3d2d63;
    --lm-muted: #5f5478; /* ≥ 5.5:1 on every Locemail surface, incl. the lilac fields */
    --lm-link: #6a49c9;
    --lm-link-hover: #553a9f;
    --lm-focus: #a184ee;
    --lm-yellow: #fdf0c9;
    --lm-yellow-edge: #e8b43c;
    --lm-yellow-text: #6b4b00;
    --lm-green: #d6f0e0;
    --lm-green-text: #1d5e40;
    --lm-green-strong: #23744f;
    --lm-red: #fbdde0;
    --lm-red-edge: #f2707f;
    --lm-red-text: #7d2230;
    --lm-red-strong: #a8323f;
    --lm-blue: #dbe9f8;
    --lm-blue-text: #25639a;
    --lm-orange: #fdeed3;
    --lm-orange-text: #9a5a0c;
    --lm-font: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --lm-shadow-card: 0 18px 36px -10px rgba(112, 100, 176, .30), inset 0 -6px 12px rgba(95, 70, 140, .12), inset 0 6px 12px rgba(255, 255, 255, .75);
    --lm-shadow-hero: 0 32px 64px -16px rgba(112, 100, 176, .38), 0 10px 20px -6px rgba(112, 100, 176, .18), inset 0 -8px 16px rgba(95, 70, 140, .14), inset 0 8px 16px rgba(255, 255, 255, .80);
    --lm-shadow-nav: 0 18px 36px -10px rgba(61, 45, 99, .40), inset 0 6px 12px rgba(255, 255, 255, .18), inset 0 -6px 12px rgba(40, 25, 80, .30);
    --lm-shadow-btn: 0 5px 0 0 #6a49c9, 0 13px 22px -6px rgba(112, 100, 176, .45), inset 0 4px 8px rgba(255, 255, 255, .30), inset 0 -4px 8px rgba(61, 45, 99, .22);
    --lm-shadow-btn-soft: 0 4px 0 0 #bda6f4, inset 0 3px 6px rgba(255, 255, 255, .6);
    --lm-shadow-field: inset 0 6px 12px -2px rgba(95, 70, 140, .26), inset 0 2px 3px rgba(95, 70, 140, .30), inset 0 -3px 6px rgba(255, 255, 255, .85);
}

/* ===== Base ======================================================================= */

html.lm-on body,
body.lm-standalone,
html body {
    font-family: var(--lm-font);
    color: var(--lm-text);
}
body {
    background: var(--lm-page);
}
html.iframe body {
    background: var(--lm-card-2);
}
.form-control,
.custom-select,
.btn,
button,
input,
select,
textarea,
.popover,
.ui-dialog,
.tooltip {
    font-family: var(--lm-font);
}
a,
.btn-link {
    color: var(--lm-link);
}
a:hover,
.btn-link:hover {
    color: var(--lm-link-hover);
}

/* Buttons */
.btn-primary,
.btn.btn-primary,
button.mainaction,
.formbuttons .btn.submit {
    background: var(--lm-primary);
    border: 0;
    color: #fff;
    border-radius: 22px;
    font-weight: 800;
    min-height: 44px;
    padding-left: 20px;
    padding-right: 20px;
    box-shadow: 0 4px 0 0 var(--lm-primary-edge), 0 10px 18px -6px rgba(112, 100, 176, .45), inset 0 3px 6px rgba(255, 255, 255, .3);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    background: var(--lm-primary-hover);
    color: #fff;
}
.btn-secondary,
.btn.btn-secondary {
    background: var(--lm-soft);
    border: 0;
    color: var(--lm-text);
    border-radius: 22px;
    font-weight: 800;
    min-height: 44px;
    box-shadow: var(--lm-shadow-btn-soft);
}
.btn-secondary:hover,
.btn-secondary:focus {
    background: #ddd2fb;
    color: var(--lm-text);
}
.btn-danger {
    background: var(--lm-red);
    color: var(--lm-red-strong);
    border: 0;
    border-radius: 22px;
    font-weight: 800;
    box-shadow: 0 4px 0 0 var(--lm-red-edge), inset 0 3px 6px rgba(255, 255, 255, .6);
}

/* Inputs */
.form-control,
.custom-select,
input.form-control,
textarea.form-control,
.input-group > .form-control,
.recipient-input.form-control {
    background-color: var(--lm-field);
    border: 0;
    border-radius: 16px;
    color: var(--lm-text);
    font-weight: 700;
    box-shadow: var(--lm-shadow-field);
}
.form-control:focus,
.custom-select:focus {
    background-color: #fff;
    border: 0;
    box-shadow: 0 0 0 3px var(--lm-focus);
    color: var(--lm-text);
}
.custom-control-input:checked ~ .custom-control-label::before,
.custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--lm-primary);
    border-color: var(--lm-primary);
}
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--lm-primary);
}

/* Messages (toasts) */
#messagestack div {
    border-radius: 18px;
    font-family: var(--lm-font);
    font-weight: 700;
    box-shadow: 0 14px 28px -12px rgba(61, 45, 99, .5);
}

/* Dialogs and popovers */
.ui-dialog,
.popover {
    border-radius: 22px !important;
    border: 0 !important;
    box-shadow: 0 24px 48px -16px rgba(61, 45, 99, .45) !important;
    overflow: hidden;
}
.popover-body .menu a,
.popupmenu a {
    color: var(--lm-text);
}

/* Elastic's blue accent (#37beff), repainted purple wherever elastic uses it. */
.quota-widget .value,
.popover .menu li a:not(.disabled):hover,
.popover .menu .dropbutton a.dropdown:hover,
#messagestack .alert-info.information,
.popupmenu .listing li > a:not(.disabled):hover,
.popupmenu .listing li.selected,
.custom-switch .custom-control-input:checked ~ .custom-control-label::before,
.googie_list li.googie_list_onhover,
.ui-menu .ui-state-active {
    background-color: var(--lm-primary) !important;
}
.btn-primary.disabled,
.btn-primary:disabled,
.ui-slider .ui-slider-handle.ui-state-active,
div.tox .tox-dialog__footer .tox-button,
.ui-datepicker a.ui-state-active {
    background: var(--lm-primary) !important;
    border-color: var(--lm-primary) !important;
}
.folderlist li.mailbox .unreadcount,
.folderlist li.mailbox.recent > a > .unreadcount {
    background: var(--lm-yellow);
    color: var(--lm-text);
}
.formcontent.raweditor .CodeMirror-focused,
.multi-input > .content.focused,
.recipient-input.focus,
.tagedit-list[tabindex="-1"],
.custom-file-input:focus ~ .custom-file-label,
.input-group-text input:focus,
div.tox.focused {
    border-color: var(--lm-focus) !important;
    box-shadow: 0 0 0 3px rgba(161, 132, 238, .45) !important;
}
.btn:focus,
.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(161, 132, 238, .55);
}
.ui.alert a:not(.btn),
.ui-datepicker .ui-state-highlight,
div.tox .tox-dialog .tox-dialog__body-nav-item--active {
    color: var(--lm-link) !important;
}
.ui.alert {
    border-radius: 18px;
}
.ui.alert.boxinformation,
p.image-attachment {
    background-color: var(--lm-softer);
}
.listing li.selected,
.listing tr.selected td,
.listing li.selected > a,
.listing li.selected > div > a {
    background-color: var(--lm-soft);
    color: var(--lm-text);
}
.listing li.focused > a,
.listing tr.focused > td {
    outline: 0;
}

/* ===== Layout: lilac page, purple navigation, cream cards (laptop) ================ */

@media screen and (min-width: 769px) {
    html:not(.iframe) body:not(.task-login) #layout {
        padding: 16px;
        gap: 0;
        box-sizing: border-box;
        background: var(--lm-page);
    }

    /* Task menu + folder list read as one purple panel. */
    html:not(.iframe) body:not(.task-login) #layout-menu {
        background: var(--lm-nav);
        border-radius: 28px 0 0 28px;
        box-shadow: var(--lm-shadow-nav);
        z-index: 2;
        clip-path: inset(-40px 0 -40px -40px);
    }
    html:not(.iframe) body:not(.task-login) #layout-sidebar {
        background: var(--lm-nav);
        border: 0;
        border-radius: 0 28px 28px 0;
        box-shadow: var(--lm-shadow-nav);
        color: #fff;
        margin-right: 16px;
        clip-path: inset(-40px -40px -40px 0);
    }
    html:not(.iframe) body:not(.task-login) #layout-sidebar {
        flex: 0 0 236px;
        min-width: 236px;
        max-width: 236px;
    }
    html:not(.iframe) body:not(.task-login) #layout-list {
        background: var(--lm-card);
        border: 0;
        border-radius: 28px;
        box-shadow: var(--lm-shadow-card);
        margin-right: 16px;
        overflow: hidden;
    }
    html:not(.iframe) body:not(.task-login) #layout-content {
        background: var(--lm-card-2);
        border-radius: 28px;
        box-shadow: var(--lm-shadow-hero);
        overflow: hidden;
    }
    /* Where the folder column is not next to the menu (compose), the menu is its own pill. */
    html:not(.iframe) body:not(.task-login) #layout-menu:not(:has(+ h1 + #layout-sidebar:not(.sidebar-right), + #layout-sidebar:not(.sidebar-right))) {
        border-radius: 28px;
        margin-right: 16px;
        clip-path: none;
        overflow: hidden;
    }
    html:not(.iframe) body:not(.task-login) #layout-sidebar.sidebar-right {
        background: var(--lm-card-2);
        color: var(--lm-text);
        border-radius: 28px;
        margin: 0 0 0 16px;
        clip-path: none;
        box-shadow: var(--lm-shadow-card);
        flex: 0 0 280px;
        max-width: 280px;
    }
    html:not(.iframe) body:not(.task-login) #layout-sidebar.sidebar-right > .header,
    html:not(.iframe) body:not(.task-login) #layout-sidebar.sidebar-right > .header .header-title {
        color: var(--lm-text);
    }
    html:not(.iframe) #layout-list.hidden + #layout-content,
    html:not(.iframe) #layout-content.only {
        margin-left: 0;
    }
}

/* Headers inside the cards */
#layout > div > .header {
    border-bottom: 0;
    background-color: transparent;
    color: var(--lm-text);
}
#layout > div > .footer {
    border-top: 0;
    background-color: transparent;
}
/* Its text colours below are light, so the column is purple in every layout — phone and
   tablet included (it used to turn cream there, leaving lilac text on cream at 1.2:1). */
body:not(.task-login) #layout-sidebar:not(.sidebar-right) {
    background-color: var(--lm-nav);
}
#layout-sidebar > .header,
#layout-sidebar > .footer {
    color: #fff;
}
#layout-sidebar > .header a.button,
#layout-sidebar > .header .header-title {
    color: #fff;
}
#layout-content > .header a.button,
#layout-list > .header a.button,
.toolbar a.button,
#layout > div > .header a.button {
    color: var(--lm-text);
}

/* --- Task menu (left column) --- */
#layout-menu #logo,
#layout-menu .popover-header img {
    display: none;
}
#layout-menu .lm-brand {
    display: flex;
    justify-content: center;
}
#layout-menu .popover-header,
#taskmenu .special-buttons {
    background-color: var(--lm-nav) !important;
}
@media screen and (min-width: 481px) {
    /* elastic pins these to the page corner; keep them inside the rounded menu. */
    html:not(.iframe) body:not(.task-login) #layout-menu {
        position: relative;
    }
    #taskmenu .special-buttons {
        width: 100%;
        border-radius: 0 0 0 28px;
        padding-bottom: 8px;
    }
}
#taskmenu .special-buttons a {
    background: transparent;
}
#taskmenu a {
    color: var(--lm-nav-text);
    border-radius: 16px;
    margin: 2px 4px;
}
#taskmenu a:hover,
#taskmenu a:focus {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}
#taskmenu a.selected {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}
/* elastic paints "Keluar" #ff5552: 2:1 on the purple. A light pink keeps the meaning. */
/* elastic sets it with !important, so this has to as well. */
#layout-menu #taskmenu a.logout,
#layout-menu #taskmenu .special-buttons a.logout,
#layout-menu #taskmenu .special-buttons a.logout:hover {
    color: #ffe0e5 !important;
}
#taskmenu .action-buttons a.compose {
    background: var(--lm-yellow);
    color: var(--lm-text);
    border-radius: 20px;
    margin: 8px;
    box-shadow: 0 4px 0 0 var(--lm-yellow-edge), 0 10px 18px -6px rgba(40, 25, 80, .45), inset 0 3px 6px rgba(255, 255, 255, .6);
}
#taskmenu .action-buttons a.compose:hover,
#taskmenu .action-buttons a.compose.selected {
    background: #fbe7ae;
    color: var(--lm-text);
}
#taskmenu a.compose .inner,
#taskmenu a .inner {
    font-family: var(--lm-font);
    font-weight: 800;
    /* Never "Tulis sebua…": a label that does not fit wraps instead. */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.15;
    overflow-wrap: anywhere;
    /* "Pengaturan" is the longest label; it must fit the 78 px rail whole. */
    font-size: 12px;
    letter-spacing: -.1px;
    padding: 0 2px;
}

/* Brand mark (initials tile) */
.lm-brandmark {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: var(--lm-yellow);
    color: #553a9f;
    font: 800 16px/1 var(--lm-font);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -.3px;
    flex-shrink: 0;
}
.lm-brandmark-lg {
    width: 80px;
    height: 80px;
    border-radius: 28px;
    background: var(--lm-primary);
    color: #fff;
    font-size: 30px;
    letter-spacing: -1px;
    box-shadow: 0 5px 0 0 var(--lm-primary-edge), 0 13px 22px -6px rgba(112, 100, 176, .45), inset 0 4px 8px rgba(255, 255, 255, .35), inset 0 -4px 8px rgba(61, 45, 99, .25);
}
.lm-brandmark-sm {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 15px;
}
.lm-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0 6px;
}
.lm-brand-text {
    display: none;
}

/* --- Folder list (purple) --- */
#layout-sidebar .header-title.username {
    color: #fff;
    font-weight: 800;
}
#layout-sidebar .listing li,
#layout-sidebar .treelist li {
    border: 0;
}
#layout-sidebar .listing li a,
#folderlist-content .treelist li a {
    color: var(--lm-nav-text);
    font-weight: 700;
    font-size: 15px;
    border-radius: 16px;
    margin: 2px 12px;
    min-height: 44px;
    line-height: 44px;
}
#layout-sidebar .listing li a:before,
#folderlist-content .treelist li a:before {
    color: var(--lm-nav-text);
}
#layout-sidebar .listing li:hover > a,
#folderlist-content .treelist li > a:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}
#layout-sidebar .listing li.selected > a,
#folderlist-content .treelist li.selected > a,
#layout-sidebar .listing li.selected > div > a {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-weight: 800;
}
#layout-sidebar .listing li.selected,
#layout-sidebar .listing li:hover,
#folderlist-content .treelist li.selected {
    background: transparent;
}
#folderlist-content .unreadcount,
#layout-sidebar .listing li .unreadcount {
    background: var(--lm-yellow);
    color: var(--lm-text);
    font-weight: 800;
    border-radius: 12px;
    min-width: 24px;
    line-height: 24px;
    height: 24px;
    padding: 0 7px;
    top: 10px;
}
#folderlist-content .treelist div.treetoggle {
    color: var(--lm-nav-text);
}
#layout-sidebar .footer .quota-widget .bar {
    background: rgba(255, 255, 255, .2);
    border: 0;
    border-radius: 5px;
}
#layout-sidebar .footer .quota-widget .bar .value {
    background: var(--lm-yellow);
}
#layout-sidebar .footer,
#layout-sidebar .footer .count {
    color: var(--lm-nav-text);
}

/* Locemail shortcuts under the folders */
.lm-sidenav {
    padding: 8px 0;
    margin: 0 12px;
    border-top: 2px solid rgba(255, 255, 255, .14);
}
.lm-sidenav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lm-sidenav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 16px;
    color: var(--lm-nav-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
}
.lm-sidenav a:hover,
.lm-sidenav a:focus,
.lm-sidenav a.lm-current {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    text-decoration: none;
}

/* ===== Message list =============================================================== */

#layout-list .searchbar,
#layout-list .searchbar.open {
    background: transparent;
}
#mailsearchform,
.searchbar input,
#layout-list .searchbar input {
    background: var(--lm-field);
    border-radius: 20px;
    box-shadow: var(--lm-shadow-field);
    font-weight: 700;
    color: var(--lm-text);
}
#layout-list .searchbar {
    margin: 0 16px 8px;
    border: 0;
    border-radius: 20px;
}
#messagelist {
    border-collapse: separate;
    border-spacing: 0 8px;
}
#layout-list > .scroller {
    padding: 0 12px;
    box-sizing: border-box;
}
#messagelist tbody tr td {
    border: 0;
    background: var(--lm-card-2);
}
#messagelist tbody tr td:first-child {
    border-radius: 20px 0 0 20px;
}
#messagelist tbody tr td:last-child {
    border-radius: 0 20px 20px 0;
}
#messagelist tbody tr.unread td {
    background: #fff;
}
#messagelist tbody tr.selected td,
#messagelist tbody tr.focused.selected td {
    background: var(--lm-soft);
}
#messagelist tbody tr.focused td {
    outline: 0;
}
#messagelist td.subject {
    position: relative;
}
#messagelist tr.lm-has-av td.subject {
    padding-left: 62px;
}
#messagelist td.subject span.fromto,
#messagelist td.subject .fromto .adr {
    font-weight: 700;
    color: var(--lm-text);
}
#messagelist tr.unread td.subject span.fromto,
#messagelist tr.unread td.subject span.subject a {
    font-weight: 800;
}
#messagelist td.subject span.subject a,
#messagelist td.subject span.subject {
    color: var(--lm-text);
}
#messagelist td.subject span.date,
#messagelist td.subject span.size {
    color: var(--lm-muted);
    font-weight: 700;
}
#messagelist tr.unread .msgicon.status:before,
#messagelist span.msgicon.status.unread:before {
    color: var(--lm-primary);
}

/* Avatars (photo or initials) */
.lm-av {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 800 15px/1 var(--lm-font);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--lm-softer);
    color: #553a9f;
}
.lm-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lm-av-list {
    position: absolute;
    left: 12px;
    top: 50%;
    margin-top: -20px;
}
.lm-tone-blue { background: var(--lm-blue); color: var(--lm-blue-text); }
.lm-tone-green { background: var(--lm-green); color: var(--lm-green-strong); }
.lm-tone-amber { background: var(--lm-orange); color: var(--lm-orange-text); }
.lm-tone-lilac { background: var(--lm-softer); color: #553a9f; }
.lm-tone-rose { background: var(--lm-red); color: var(--lm-red-strong); }

/* ===== Reading view =============================================================== */

html.iframe body.action-preview,
html.iframe body.action-show,
body.task-mail.action-show #layout-content {
    background: var(--lm-card-2);
}
#message-header h2.subject {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -.3px;
    color: var(--lm-text);
}
#message-header .header .contactphoto {
    border-radius: 15px;
    width: 44px;
    height: 44px;
    object-fit: cover;
    background: var(--lm-softer);
}
#message-header .header-summary,
#message-header .header-headers {
    color: var(--lm-muted);
    font-weight: 700;
}
#message-header .header-summary a,
#message-header .rcmContactAddress {
    color: var(--lm-text);
    font-weight: 800;
}
#messagebody {
    background: var(--lm-card);
    border-radius: 22px;
    margin: 12px 0 0;
    padding: 4px 8px;
}
#messagebody .message-part,
#messagebody .message-htmlpart {
    color: var(--lm-text);
}
/* Plain-text mail in the house font; line breaks and spacing are kept. */
#messagebody .message-part div.pre {
    font-family: var(--lm-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.65;
}
.attachmentslist li {
    background: var(--lm-card-2);
    border-radius: 16px;
    box-shadow: inset 0 0 0 2px var(--lm-soft);
}

/* Safety hints (from the plugin's message_objects hook) */
#message-objects .lm-objects {
    display: block;
    padding: 0;
    margin: 0 0 12px;
    background: none;
    border: 0;
    box-shadow: none;
}
.lm-alert {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-radius: 22px;
    padding: 16px 18px;
    margin: 0 0 12px;
}
.lm-alert-bad {
    background: var(--lm-red);
    color: var(--lm-red-text);
}
.lm-alert-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 15px;
    background: var(--lm-red-edge);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lm-alert-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 700;
    line-height: 1.45;
    min-width: 0;
}
.lm-alert-body strong {
    font-weight: 800;
    font-size: 16px;
}
.lm-alert details {
    font-size: 13px;
}
.lm-alert summary {
    cursor: pointer;
    font-weight: 800;
}
.lm-alert code,
.lm-reason code {
    display: block;
    margin-top: 6px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    color: inherit;
    white-space: pre-wrap;
    word-break: break-word;
}
.lm-btn-white,
.btn.lm-btn.lm-btn-white {
    background: #fff;
    color: var(--lm-red-strong);
    box-shadow: 0 4px 0 0 var(--lm-red-edge);
}
.lm-safety-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.lm-linktag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 10px;
    border-radius: 10px;
    background: var(--lm-yellow);
    color: #8a5f00;
    font: 800 12px/1.5 var(--lm-font);
    text-decoration: none;
    vertical-align: middle;
}
.lm-linktag-bad {
    background: var(--lm-red);
    color: var(--lm-red-strong);
}

/* ===== Compose ==================================================================== */

#compose-headers .compose-headers,
body.action-compose #compose-content > .compose-headers {
    background: var(--lm-card);
    border-radius: 22px;
    padding: 6px 18px;
}
#compose-headers .form-group {
    border-bottom: 2px solid var(--lm-softer);
    min-height: 52px;
    margin: 0;
    padding: 6px 0;
    align-items: center;
}
#compose-headers .form-group:last-child {
    border-bottom: 0;
}
#compose-headers .col-form-label,
#compose-headers label {
    color: var(--lm-muted);
    font-weight: 800;
}
#compose-headers .form-control,
#compose-headers .custom-select,
#compose-headers .recipient-input {
    background: transparent;
    box-shadow: none;
}
#compose-headers .form-control:focus,
#compose-headers .recipient-input.focus {
    background: #fff;
    box-shadow: 0 0 0 3px var(--lm-focus);
}
.recipient-input li.recipient {
    background: var(--lm-soft);
    border: 0;
    border-radius: 17px;
    color: var(--lm-text);
    font-weight: 800;
    padding: 2px 6px 2px 12px;
    line-height: 28px;
}
.recipient-input li.recipient.lm-outside {
    background: var(--lm-yellow);
    color: var(--lm-yellow-text);
}
.lm-outside-tag {
    font-size: 11px;
    font-weight: 800;
    margin: 0 4px;
}
.lm-outside-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    padding: 10px 14px;
    border-radius: 16px;
    background: var(--lm-yellow);
    color: var(--lm-yellow-text);
    font-weight: 800;
    font-size: 13px;
}
.lm-outside-note::before {
    content: '!';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}
.lm-outside-note[hidden] {
    display: none;
}
.lm-ccbcc {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 0 6px;
}
.lm-ccbcc-btn {
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 15px;
    background: var(--lm-primary);
    color: #fff;
    font: 800 13px var(--lm-font);
    cursor: pointer;
}
.lm-ccbcc-btn[hidden] {
    display: none;
}
.lm-ccbcc-btn:focus-visible {
    outline: 3px solid var(--lm-focus);
    outline-offset: 2px;
}
#compose-content .editor-toolbar,
.mce-tinymce,
.tox .tox-editor-header,
.tox-tinymce {
    border-radius: 22px;
}
#compose-content .tox-tinymce,
#composebody {
    border: 0;
    border-radius: 22px;
    background: var(--lm-card);
}
#compose-attachments.file-upload {
    border-radius: 22px;
}

/* ===== Settings and the Locemail pages ============================================ */

#settings-menu li a,
#sections-table tr td {
    font-weight: 700;
    color: var(--lm-text);
}
#settings-menu li.selected > a,
#sections-table tr.selected td,
#settings-menu li:hover > a {
    background: var(--lm-soft);
    color: var(--lm-text);
}
#settings-menu li,
#sections-table tr {
    border: 0;
}
#settings-menu li a {
    border-radius: 16px;
    margin: 2px 12px;
}
/* Icons for the three Locemail sections (FontAwesome glyphs shipped with elastic). */
#settings-menu li.locemail-status a:before { content: "\f1d8"; }
#settings-menu li.locemail-integrasi a:before { content: "\f064"; }
#settings-menu li.locemail-profil a:before { content: "\f2bd"; }

.lm-page-wrap {
    background: transparent;
}
html.iframe .lm-page-wrap {
    min-height: 100%;
}
html:not(.iframe) #layout-content > .header {
    background: transparent;
}
/* On a wide screen a settings page's header holds nothing (its back button and title are
   for narrow screens), which left an empty band above every page heading. */
@media screen and (min-width: 1201px) {
    body.task-settings #layout-content > .header {
        display: none;
    }
}
.lm-page {
    max-width: 1100px;
    padding: 24px 32px 28px !important;
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: var(--lm-text);
    font-weight: 600;
}
.lm-pagehead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.lm-pagehead h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: var(--lm-text);
}
.lm-pagehead p {
    margin: 4px 0 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--lm-muted);
}
.lm-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}
.lm-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.lm-card {
    background: var(--lm-card-2);
    border-radius: 26px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 18px 36px -10px rgba(112, 100, 176, .30), inset 0 6px 12px rgba(255, 255, 255, .75);
    min-width: 0;
}
.lm-card h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--lm-text);
}
.lm-card[hidden] {
    display: none;
}
.lm-feature-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lm-feature-head > div {
    display: flex;
    flex-direction: column;
}
.lm-feature-head span {
    font-size: 13px;
    color: var(--lm-muted);
}
.lm-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lm-feature-icon.lm-tone-amber { background: var(--lm-orange); color: var(--lm-orange-text); }
.lm-feature-icon.lm-tone-blue { background: var(--lm-blue); color: var(--lm-blue-text); }

.lm-btn,
a.lm-btn,
label.lm-btn,
button.lm-btn,
.btn.lm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 22px;
    font: 800 15px/1.2 var(--lm-font);
    text-decoration: none;
    cursor: pointer;
    align-self: flex-start;
}
.lm-btn-primary,
.btn.lm-btn-primary {
    background: var(--lm-primary);
    color: #fff;
    box-shadow: 0 4px 0 0 var(--lm-primary-edge), 0 10px 18px -6px rgba(112, 100, 176, .45), inset 0 3px 6px rgba(255, 255, 255, .3);
}
.lm-btn-primary:hover,
.lm-btn-primary:focus,
.btn.lm-btn-primary:hover,
.btn.lm-btn-primary:focus {
    background: var(--lm-primary-hover);
    color: #fff;
    text-decoration: none;
}
.lm-btn-soft,
.btn.lm-btn-soft {
    background: var(--lm-soft);
    color: var(--lm-text);
    box-shadow: var(--lm-shadow-btn-soft);
}
.lm-btn-soft:hover,
.lm-btn-soft:focus,
.btn.lm-btn-soft:hover,
.btn.lm-btn-soft:focus {
    background: #ddd2fb;
    color: var(--lm-text);
    text-decoration: none;
}
.lm-btn-block {
    align-self: stretch;
    width: 100%;
}
.lm-linkbtn {
    background: none;
    border: 0;
    padding: 0;
    min-height: 44px;
    color: var(--lm-red-strong);
    font: 800 14px var(--lm-font);
    cursor: pointer;
}
.lm-btn:focus-visible,
.lm-linkbtn:focus-visible,
.lm-copybtn:focus-visible,
.lm-linkrow:focus-visible {
    outline: 3px solid var(--lm-focus);
    outline-offset: 2px;
}

.lm-note {
    border-radius: 18px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    display: block;
}
.lm-note strong {
    font-weight: 800;
}
.lm-note > strong:first-child:not(:only-child) {
    display: block;
    margin-bottom: 2px;
}
.lm-note-green { background: var(--lm-green); color: var(--lm-green-text); }
.lm-note-amber { background: var(--lm-yellow); color: var(--lm-yellow-text); }
.lm-note-info { background: var(--lm-blue); color: #1f4f7c; }

.lm-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: var(--lm-text);
    margin: 0;
}
.lm-field input,
.lm-field textarea {
    min-height: 50px;
    box-sizing: border-box;
    border: 0;
    border-radius: 20px;
    background: var(--lm-field);
    padding: 0 16px;
    font: 700 15px var(--lm-font);
    color: var(--lm-text);
    box-shadow: var(--lm-shadow-field);
    width: 100%;
}
.lm-field textarea {
    padding: 12px 16px;
    resize: vertical;
}
.lm-field input:focus,
.lm-field textarea:focus {
    outline: 0;
    background: #fff;
    box-shadow: 0 0 0 3px var(--lm-focus);
}
.lm-field input[aria-invalid="true"] {
    box-shadow: 0 0 0 3px var(--lm-red-edge);
}
.lm-field-error {
    color: var(--lm-red-strong);
    font-weight: 800;
    font-size: 13px;
}

.lm-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.lm-chip {
    min-height: 32px;
    padding: 4px 14px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
}
.lm-chip-ok { background: var(--lm-green); color: var(--lm-green-strong); }
.lm-chip-wait { background: var(--lm-yellow); color: #8a5f00; }
.lm-chip-bad { background: var(--lm-red); color: var(--lm-red-strong); }
.lm-chip-info { background: var(--lm-blue); color: #1f4f7c; }

/* Status table */
.lm-table {
    background: var(--lm-card-2);
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.lm-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 2fr) minmax(0, 1.4fr) 130px minmax(0, 2fr);
    gap: 16px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    align-items: center;
    border-top: 2px solid var(--lm-softer);
}
.lm-row-head {
    font-size: 12px;
    font-weight: 800;
    color: var(--lm-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    background: var(--lm-softer);
    border-top: 0;
}
.lm-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lm-muted {
    color: var(--lm-muted);
}
.lm-reason details summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 12px;
    color: var(--lm-link);
}
.lm-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
}
.lm-pill-sent { background: var(--lm-green); color: var(--lm-green-strong); }
.lm-pill-deferred { background: var(--lm-yellow); color: #8a5f00; }
.lm-pill-held { background: var(--lm-soft); color: #553a9f; }
.lm-pill-bounced,
.lm-pill-rejected { background: var(--lm-red); color: var(--lm-red-strong); }

/* Profile */
.lm-photo-row {
    display: flex;
    align-items: center;
    gap: 20px;
}
.lm-profile-photo {
    width: 112px;
    height: 112px;
    border-radius: 36px;
    border: 4px solid #fff;
    box-shadow: 0 14px 26px -10px rgba(112, 100, 176, .5);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--lm-blue);
}
.lm-profile-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font: 800 34px/1 var(--lm-font);
    color: var(--lm-blue-text);
}
.lm-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}
.lm-photo-actions small {
    font-size: 12px;
    font-weight: 700;
    color: var(--lm-muted);
}
.lm-file {
    position: relative;
    overflow: hidden;
}
.lm-file input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}
.lm-file:focus-within {
    outline: 3px solid var(--lm-focus);
    outline-offset: 2px;
}
.lm-inline-form {
    margin: -6px 0 0;
}
.lm-id-form,
.lm-photo-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
}
.lm-details summary {
    list-style: none;
}
.lm-details summary::-webkit-details-marker {
    display: none;
}
.lm-details[open] summary {
    margin-bottom: 12px;
}

/* Guide (shared by Integrasi and the stand-alone page) */
.lm-guide {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.lm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: var(--lm-field);
    border-radius: 20px;
    padding: 5px;
}
.lm-tab-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.lm-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    padding: 0 6px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--lm-muted);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lm-tab-input:checked + .lm-tab {
    background: #fff;
    color: var(--lm-text);
    font-weight: 800;
    box-shadow: 0 4px 10px -4px rgba(112, 100, 176, .4);
}
.lm-tab-input:focus-visible + .lm-tab {
    outline: 3px solid var(--lm-focus);
}
.lm-tabs > .lm-note,
.lm-tabs > .lm-tab-panels {
    flex-basis: 100%;
}
.lm-tabs > .lm-note {
    margin-top: 8px;
}
.lm-tab-panels {
    background: var(--lm-card-2);
    border-radius: 16px;
    padding: 14px;
    margin: 0 -5px -5px;
}
.lm-tab-panel {
    display: none;
    flex-direction: column;
    gap: 12px;
}
#lm-app-gmail:checked ~ .lm-tab-panels .lm-panel-gmail,
#lm-app-iphone:checked ~ .lm-tab-panels .lm-panel-iphone,
#lm-app-outlook:checked ~ .lm-tab-panels .lm-panel-outlook,
#lm-app-thunderbird:checked ~ .lm-tab-panels .lm-panel-thunderbird {
    display: flex;
}
.lm-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.lm-steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}
.lm-step {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--lm-primary);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lm-profile-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}
.lm-profile-form small {
    font-size: 12px;
    color: var(--lm-muted);
    font-weight: 700;
    line-height: 1.4;
}
.lm-manual {
    gap: 8px;
}
.lm-manual small {
    font-size: 12px;
    font-weight: 700;
    color: var(--lm-muted);
    line-height: 1.4;
}
.lm-eyebrow {
    font-size: 12px;
    font-weight: 800;
    color: var(--lm-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.lm-copyrow {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--lm-softer);
    border-radius: 14px;
    padding: 10px 12px;
}
.lm-copyrow > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.lm-copyrow-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--lm-muted);
}
.lm-copyrow-value {
    font-size: 14px;
    font-weight: 800;
    word-break: break-all;
}
.lm-copybtn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--lm-soft);
    color: #553a9f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.lm-copybtn.lm-copied {
    background: var(--lm-green);
    color: var(--lm-green-strong);
}
.lm-linkrow {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 18px;
    background: var(--lm-softer);
    color: var(--lm-text);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}
.lm-linkrow span:first-child {
    flex: 1;
}
.lm-linkrow:hover,
.lm-linkrow:focus {
    background: var(--lm-soft);
    color: var(--lm-text);
    text-decoration: none;
}
.lm-install {
    background: var(--lm-green);
    color: var(--lm-green-text);
}
.lm-install-ios {
    background: var(--lm-blue);
    color: #1f4f7c;
}

/* ===== Login ====================================================================== */

body.task-login {
    background: var(--lm-page);
    overflow: auto;
}
body.task-login #layout {
    height: auto;
    min-height: 100%;
    overflow: visible;
    background:
        radial-gradient(circle at 18% 22%, rgba(253, 240, 201, .75) 0, rgba(253, 240, 201, 0) 22%),
        radial-gradient(circle at 82% 28%, rgba(219, 233, 248, .8) 0, rgba(219, 233, 248, 0) 26%),
        radial-gradient(circle at 30% 85%, rgba(251, 221, 224, .75) 0, rgba(251, 221, 224, 0) 24%),
        radial-gradient(circle at 74% 88%, rgba(214, 240, 224, .75) 0, rgba(214, 240, 224, 0) 20%),
        var(--lm-page);
}
body.task-login #layout-content {
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 64px 16px 72px;
    box-sizing: border-box;
    min-height: 100vh;
    height: auto;
    overflow: visible;
}
body.task-login #logo {
    display: none;
}
body.task-login #login-form {
    top: 0;
    width: 100%;
    max-width: 448px;
    margin: 40px auto 0;
    background: var(--lm-card);
    border-radius: 36px;
    padding: 0 36px 28px;
    box-sizing: border-box;
    box-shadow: var(--lm-shadow-hero);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.lm-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}
.lm-login-brand .lm-brandmark-lg {
    margin: -40px 0 18px;
}
.lm-login-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--lm-text);
}
.lm-login-sub {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--lm-muted);
}
.lm-login-inner {
    background: var(--lm-card-2);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 18px 36px -10px rgba(112, 100, 176, .30), 0 6px 12px -4px rgba(112, 100, 176, .16), inset 0 -6px 12px rgba(95, 70, 140, .16), inset 0 6px 12px rgba(255, 255, 255, .75);
}
body.task-login #login-form table,
body.task-login #login-form tbody {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}
body.task-login #login-form tr {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}
body.task-login #login-form td {
    display: block;
    border: 0;
    padding: 0;
    width: 100%;
    text-align: left;
}
body.task-login #login-form td.title {
    display: block !important;
    font-size: 14px;
    font-weight: 800;
    color: var(--lm-text);
}
body.task-login #login-form td.title label {
    margin: 0;
}
body.task-login #login-form td.input {
    display: flex;
}
body.task-login #login-form .input-group-prepend {
    display: none;
}
body.task-login #login-form input.form-control {
    width: 100%;
    height: 52px;
    border-radius: 20px !important;
    background: var(--lm-field);
    padding: 0 18px;
    font: 700 16px var(--lm-font);
    color: var(--lm-text);
    box-shadow: var(--lm-shadow-field);
}
body.task-login #login-form input.form-control::placeholder {
    color: transparent;
}
body.task-login #login-form input.form-control:focus {
    background: #fff;
    box-shadow: inset 0 0 0 3px var(--lm-focus);
}
body.task-login #login-form .formbuttons {
    margin: 20px 0 0;
    padding: 0;
}
body.task-login #rcmloginsubmit {
    height: 56px;
    border: 0;
    border-radius: 24px;
    background: var(--lm-primary);
    color: #fff;
    font: 800 17px var(--lm-font);
    text-transform: none !important;
    box-shadow: var(--lm-shadow-btn);
}
body.task-login #rcmloginsubmit:hover,
body.task-login #rcmloginsubmit:focus {
    background: var(--lm-primary-hover);
}
body.task-login #login-footer {
    color: var(--lm-muted);
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
}
body.task-login #login-footer > div {
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
}
.lm-login-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px 12px;
    flex-wrap: wrap;
}
.lm-login-guide {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 800;
    color: var(--lm-link);
}
.lm-login-guide svg,
.lm-login-guide .lm-phone-only {
    display: none;
}
.lm-powered {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--lm-muted);
}
.lm-powered strong {
    color: #553a9f;
    font-weight: 800;
}
.lm-login-host {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -40px;
    margin: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #553a9f;
}
body.task-login #messagestack {
    z-index: 20;
}

@media screen and (max-width: 480px) {
    body.task-login #layout-content {
        justify-content: flex-start;
        padding: 72px 16px 64px;
    }
    body.task-login #login-form {
        border-radius: 32px;
        padding: 0 20px 24px;
        gap: 20px;
    }
    .lm-login-brand .lm-brandmark-lg {
        width: 72px;
        height: 72px;
        border-radius: 26px;
        font-size: 26px;
        margin: -36px 0 14px;
    }
    .lm-login-title {
        font-size: 24px;
    }
    .lm-login-sub {
        font-size: 14px;
    }
    .lm-login-inner {
        padding: 18px;
        border-radius: 26px;
    }
    /* On a phone the setup guide is the useful link: a green tile, as in the mock-up. */
    .lm-login-foot {
        flex-direction: column;
        align-items: stretch;
    }
    .lm-login-guide {
        background: var(--lm-green);
        color: var(--lm-green-strong);
        border-radius: 22px;
        padding: 14px 16px;
        font-size: 14px;
    }
    .lm-login-guide svg,
    .lm-login-guide .lm-phone-only {
        display: inline;
    }
    .lm-login-guide svg {
        flex-shrink: 0;
    }
    .lm-login-guide .lm-desk-only {
        display: none;
    }
    .lm-powered {
        justify-content: center;
    }
}

/* ===== Phone (elastic's small layout) ============================================= */

@media screen and (max-width: 768px) {
    body:not(.task-login) {
        background: var(--lm-card);
    }
    html:not(.iframe) body:not(.task-login) #layout > div > .header {
        background: var(--lm-nav) !important;
        color: #fff;
        border-radius: 0 0 26px 26px;
        box-shadow: 0 14px 28px -12px rgba(61, 45, 99, .45);
    }
    html:not(.iframe) #layout > div > .header a.button,
    html:not(.iframe) #layout > div > .header .header-title,
    html:not(.iframe) #layout > div > .header a.button:before {
        color: #fff !important;
    }
    body:not(.task-login) #layout-list,
    body:not(.task-login) #layout-sidebar.sidebar-right,
    body:not(.task-login) #layout-content {
        background: var(--lm-card) !important;
    }
    body:not(.task-login) #layout-sidebar:not(.sidebar-right) {
        background: var(--lm-nav) !important;
    }
    #layout-list .searchbar {
        margin: 12px 16px 4px;
    }
    #messagelist {
        padding: 0 10px;
    }
    #messagelist tbody tr td {
        background: var(--lm-card-2);
    }
    .floating-action-buttons a.button,
    .floating-action-buttons .button {
        background: var(--lm-yellow) !important;
        color: var(--lm-text) !important;
        border-radius: 24px !important;
        box-shadow: 0 5px 0 0 var(--lm-yellow-edge), 0 16px 26px -8px rgba(112, 100, 176, .55), inset 0 4px 8px rgba(255, 255, 255, .6) !important;
    }
    html.lm-on #layout-list > .floating-action-buttons,
    html.lm-on #layout-content > .floating-action-buttons {
        bottom: 16px;
        right: 16px;
    }
    html.lm-on .floating-action-buttons a.button {
        width: auto;
        height: 56px;
        margin: 0;
        padding: 0 22px 0 18px;
        float: none;
        opacity: 1;
        display: flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
    }
    html.lm-on .floating-action-buttons a.button:before {
        width: auto;
        height: auto;
        line-height: 1;
        font-size: 18px;
    }
    html.lm-on .floating-action-buttons a.button .inner {
        display: inline;
        font: 800 16px var(--lm-font);
    }
    #layout-list > .scroller {
        padding: 0 12px;
    }
    #messagelist {
        padding: 0;
    }
    #layout-menu {
        background: var(--lm-nav);
    }
    #layout-menu .popover-header {
        background: var(--lm-nav) !important;
    }
    .lm-grid2 {
        grid-template-columns: minmax(0, 1fr);
    }
    .lm-page {
        padding: 18px 16px !important;
    }
    .lm-row-head {
        display: none;
    }
    .lm-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding: 14px 16px;
    }
    .lm-row [data-label]:not(:first-child)::before {
        content: attr(data-label) ' · ';
        font-size: 11px;
        font-weight: 800;
        color: var(--lm-muted);
        text-transform: uppercase;
    }
}
@media screen and (max-width: 560px) {
    .lm-alert {
        flex-wrap: wrap;
    }
    .lm-alert .lm-btn {
        width: 100%;
    }
}

/* Phone bottom bar (mail list only) */
.lm-bottombar {
    display: none;
}
@media screen and (max-width: 480px) {
    html:not(.iframe) .lm-bottombar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 76px;
        z-index: 10;
        background: var(--lm-card-2);
        border-radius: 28px 28px 0 0;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px env(safe-area-inset-bottom);
        box-sizing: border-box;
        box-shadow: 0 -10px 24px -12px rgba(112, 100, 176, .35);
    }
    html.lm-on body.task-mail.action-none #layout-list {
        padding-bottom: 76px;
    }
    /* Above the bottom bar (76 px) and the list's page navigation under it. */
    html.lm-on #layout-list > .floating-action-buttons {
        bottom: 128px;
    }
    /* Reading a message: the bar steps aside for the message's own toolbar. */
    body:has(#layout-content.selected) .lm-bottombar,
    body:has(#layout-sidebar.selected) .lm-bottombar {
        display: none !important;
    }
    .lm-bottombar button {
        background: none;
        border: 0;
        min-width: 64px;
        min-height: 48px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--lm-muted);
        font: 700 12px var(--lm-font);
    }
    .lm-bottombar button.lm-current {
        color: var(--lm-nav);
        font-weight: 800;
    }
    body.task-mail.action-none.lm-content-open .lm-bottombar {
        display: none;
    }
}

/* ===== Stand-alone guide page ===================================================== */

body.lm-standalone {
    margin: 0;
    min-height: 100vh;
    background: var(--lm-card);
    overflow: auto;
    height: auto;
}
.lm-appbar {
    background: var(--lm-nav);
    padding: 18px 16px 20px;
    border-radius: 0 0 28px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 14px 28px -12px rgba(61, 45, 99, .45);
}
.lm-iconbtn {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lm-appbar-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.lm-appbar-title span {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}
.lm-appbar-title small {
    font-size: 12px;
    font-weight: 700;
    color: var(--lm-yellow);
}
.lm-standalone-main {
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.lm-standalone .lm-card {
    padding: 14px;
}
.lm-foot {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #553a9f;
    margin: 8px 0 0;
}
.lm-foot strong {
    font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Phones and touch screens: elastic turns each list row into a flex box, so the row
   card is the <tr> itself and the subject cell must be allowed to shrink. */
html.layout-phone #messagelist tbody tr,
html.touch #messagelist tbody tr {
    margin-bottom: 8px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--lm-card-2);
}
html.layout-phone #messagelist tbody tr td,
html.touch #messagelist tbody tr td {
    border-radius: 0 !important;
}
html.layout-phone #messagelist td.subject,
html.touch #messagelist td.subject {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
}
html.layout-phone #messagelist tbody tr td.flags,
html.touch #messagelist tbody tr td.flags {
    background: transparent;
}

/* elastic's own greys on Locemail's cream: page navigation and upload hints were 4.3:1. */
.pagenav-text,
.pagenav .pagenav-text,
#layout .footer .pagenav-text,
.file-upload .hint,
.hint,
.formcontent .hint {
    color: var(--lm-muted);
}

/* ===== HTML editor (TinyMCE "silver" theme inside elastic) ========================= */

/* The editor is a clay card like the address block above it. */
#compose-content .tox-tinymce,
.tox.tox-tinymce {
    border: 0;
    border-radius: 22px;
    box-shadow: inset 0 0 0 2px var(--lm-soft);
    background: #fff;
}
#compose-content .tox-tinymce.focused,
.tox.tox-tinymce.focused {
    box-shadow: inset 0 0 0 3px var(--lm-focus);
}
.tox .tox-editor-header,
.tox .tox-toolbar-overlord,
.tox .tox-toolbar,
.tox .tox-toolbar__primary,
.tox .tox-toolbar__overflow {
    background: var(--lm-softer) !important;
    background-image: none !important;
    border: 0 !important;
}
.tox .tox-editor-header {
    border-bottom: 2px solid var(--lm-soft) !important;
}
.tox .tox-toolbar__group {
    border-color: var(--lm-soft) !important;
    padding: 0 4px !important;
}
.tox .tox-tbtn,
.tox .tox-split-button {
    color: var(--lm-text) !important;
    border-radius: 10px !important;
    height: 36px !important;
    min-width: 36px;
}
.tox .tox-tbtn svg,
.tox .tox-split-button svg {
    fill: var(--lm-text) !important;
}
.tox .tox-tbtn:hover,
.tox .tox-split-button:hover,
.tox .tox-tbtn:focus {
    background: var(--lm-soft) !important;
}
.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover {
    background: #ddd2fb !important;
    color: var(--lm-text) !important;
}
.tox .tox-tbtn--disabled svg,
.tox .tox-tbtn:disabled svg {
    fill: #8f86a6 !important;
}
.tox .tox-tbtn__select-label {
    color: var(--lm-text);
    font-family: var(--lm-font);
    font-weight: 700;
}
/* Phone: one row that scrolls sideways, buttons big enough for a thumb. */
@media screen and (max-width: 768px) {
    .tox .tox-toolbar__primary,
    .tox .tox-toolbar {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .tox .tox-tbtn,
    .tox .tox-split-button {
        height: 44px !important;
        min-width: 44px;
    }
}

/* Dialogs (link, image, table) and drop-down menus. */
.tox .tox-dialog {
    border: 0 !important;
    border-radius: 22px !important;
    box-shadow: 0 24px 48px -16px rgba(61, 45, 99, .45) !important;
    background: var(--lm-card-2) !important;
    color: var(--lm-text) !important;
}
.tox .tox-dialog-wrap__backdrop {
    background: rgba(61, 45, 99, .35) !important;
}
.tox .tox-dialog__header,
.tox .tox-dialog__footer,
.tox .tox-dialog__body {
    background: var(--lm-card-2) !important;
    color: var(--lm-text) !important;
    border-color: var(--lm-soft) !important;
}
.tox .tox-dialog__title {
    font-family: var(--lm-font) !important;
    font-weight: 800 !important;
    color: var(--lm-text) !important;
}
.tox .tox-label,
.tox .tox-form__group label,
.tox .tox-checkbox__label {
    color: var(--lm-text) !important;
    font-family: var(--lm-font);
    font-weight: 700;
}
.tox .tox-textfield,
.tox .tox-listboxfield .tox-listbox--select,
.tox .tox-textarea,
.tox .tox-selectfield select {
    background: var(--lm-field) !important;
    border: 0 !important;
    border-radius: 14px !important;
    color: var(--lm-text) !important;
    font-family: var(--lm-font);
    font-weight: 700;
    min-height: 44px;
    box-shadow: var(--lm-shadow-field);
}
.tox .tox-textfield:focus,
.tox .tox-listboxfield .tox-listbox--select:focus,
.tox .tox-textarea:focus {
    background: #fff !important;
    box-shadow: 0 0 0 3px var(--lm-focus) !important;
}
.tox .tox-button {
    border-radius: 22px !important;
    font-family: var(--lm-font) !important;
    font-weight: 800 !important;
    min-height: 44px;
    padding: 0 18px !important;
}
.tox .tox-button:not(.tox-button--secondary):not(.tox-button--naked) {
    background: var(--lm-primary) !important;
    border-color: var(--lm-primary) !important;
    color: #fff !important;
}
.tox .tox-button--secondary {
    background: var(--lm-soft) !important;
    border-color: var(--lm-soft) !important;
    color: var(--lm-text) !important;
}
.tox .tox-button--naked,
.tox .tox-button--icon {
    color: var(--lm-text) !important;
}
.tox .tox-button--naked svg {
    fill: var(--lm-text) !important;
}
.tox .tox-menu,
.tox .tox-collection--list,
.tox .tox-collection--toolbar {
    background: var(--lm-card-2) !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 32px -12px rgba(61, 45, 99, .4) !important;
}
.tox .tox-collection__item {
    color: var(--lm-text) !important;
}
.tox .tox-collection__item--active,
.tox .tox-collection__item--enabled {
    background: var(--lm-soft) !important;
    color: var(--lm-text) !important;
}

/* elastic paints every dialog-footer button purple; TinyMCE's "Cancel" is secondary. */
div.tox .tox-dialog__footer .tox-button.tox-button--secondary,
div.tox .tox-dialog__footer .tox-button.tox-button--secondary:hover,
div.tox .tox-dialog__footer .tox-button.tox-button--secondary:focus {
    background: var(--lm-soft) !important;
    border-color: var(--lm-soft) !important;
    color: var(--lm-text) !important;
}
