:root {
    --rea-primary-text: #6b652f;
    --rea-dark: #1b1919;
    --rea-accent: #c1bf87;
    --rea-on-accent: #1b1919;
    --rea-ink: #202020;
    --rea-muted: #697180;
    --rea-line: #e6e8ed;
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 1rem; }
body.task-login { background: #f3f4f7; color: var(--rea-ink); overflow: auto; height: auto; min-height: 100dvh; }
body.task-login #layout { min-height: 100dvh; height: auto; align-items: center; }
body.task-login::before {
    content: "";
    position: fixed;
    inset: 0 50% 0 0;
    background: var(--rea-dark) url("assets/post.svg") center / cover no-repeat;
}
body.task-login::after {
    content: "REA POÇT";
    position: fixed;
    top: 3rem;
    left: 5%;
    z-index: 1;
    color: var(--rea-accent);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: .2em;
    pointer-events: none;
}
body.task-login #layout #layout-content {
    position: relative;
    flex: 0 0 auto;
    margin: 0 8% 0 auto;
    width: min(36%, 30rem);
    max-width: none;
    padding: 3rem 0;
    height: auto;
    text-align: left;
    background: transparent;
    overflow: visible;
}
body.task-login #layout #layout-content #logo { position: static; top: 0; display: block; width: 9.5rem; max-height: none; height: auto; margin: 0 0 2.75rem; }
body.task-login #login-form { position: static; top: 0; width: 100%; max-width: none; }
.rea-login-intro h1 { font-size: 1.25rem; line-height: 1.4; letter-spacing: .01em; font-weight: 450; color: var(--rea-primary-text); margin: 0 0 1.5rem; }
.rea-login-intro h1 strong { font-weight: 600; }
.rea-provider-choices { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
body.task-login .rea-provider-option {
    display: block; width: 100%; margin: 0; padding: .75rem .7rem;
    min-height: 3.25rem; border: 1px solid #b9b8a8; border-radius: .7rem;
    background: transparent; color: var(--rea-primary-text); font: inherit;
    font-size: 1rem; font-weight: 600; line-height: 1.4; cursor: pointer;
    white-space: normal;
}
body.task-login .rea-provider-option[aria-pressed="true"] { background: #e9e8d7; border-color: #807c3d; color: #514c24; }
body.task-login .rea-provider-option:hover { border-color: #807c3d; }
.rea-provider-description { margin: .75rem 0 1.25rem; color: #555e6b; font-size: 1rem; line-height: 1.6; }
.rea-provider-page { padding: 1.5rem; width: 100%; max-width: 48rem; margin: 0 auto; font-size: max(1rem, 16px); box-sizing: border-box; overflow: auto; min-height: 0; }
.rea-provider-page h1 { font-size: 1.4rem; color: var(--rea-primary-text); }
.rea-provider-account { overflow-wrap: anywhere; color: #555e6b; }
.rea-provider-card { padding: 1.25rem; margin: 1.25rem 0; border: 1px solid #d6dae3; border-radius: .8rem; background: #fff; }
.rea-provider-card h2 { font-size: 1.25rem; font-weight: 600; }
.rea-provider-card p { line-height: 1.6; }
.rea-current-provider { color: var(--rea-primary-text); font-weight: 600; }
.rea-request-status { padding: .85rem 1rem; border-radius: .5rem; background: #efeee0; color: #514c24; }
.rea-migration-consent { display: flex; align-items: flex-start; gap: .75rem; font-weight: 400; margin: 1rem 0; line-height: 1.6; }
.rea-migration-consent input { flex: 0 0 auto; margin-top: .3rem; width: 1.15rem; height: 1.15rem; accent-color: #6b652f; }
.rea-migration-form .btn, .rea-provider-card > .btn { min-height: 2.75rem; display: inline-flex; align-items: center; white-space: normal; text-align: left; }
body:not(.task-login) #settings-menu li.selected > a { background: #efeee0; color: #514c24; }
body.task-login .form-control { border-radius: .7rem; border: 1px solid #d6dae3; min-height: 3.25rem; background: #fff; font-size: 1rem; box-shadow: none; }
body.task-login .form-control:focus { border-color: #807c3d; box-shadow: 0 0 0 .2rem #c1bf8733; }
body.task-login .input-group-text { background: #fff; border-color: #d6dae3; color: var(--rea-muted); border-radius: .7rem 0 0 .7rem; }
body.task-login .input-group { margin-bottom: 1rem; }
body.task-login button.mainaction { width: 100%; min-height: 3.25rem; background: var(--rea-accent); color: var(--rea-on-accent); border: 0; border-radius: .7rem; font-size: 1rem; font-weight: 650; margin-top: .5rem; text-transform: none; }
body.task-login button.mainaction:hover { background: #d0ce9f; }
.rea-login-help { margin-top: 1.5rem; color: var(--rea-muted); font-size: .875rem; line-height: 1.7; }
.rea-login-help strong { font-weight: 600; color: var(--rea-ink); }
.rea-login-help details { border-top: 1px solid #dfe2e8; padding-top: 1rem; margin-top: 1rem; }
.rea-login-help summary { color: var(--rea-primary-text); cursor: pointer; font-size: .9375rem; font-weight: 600; }
.rea-login-help details p { margin: 1rem 0 .5rem; }
.rea-login-help a { color: var(--rea-primary-text); text-decoration: underline; text-underline-offset: .2em; }
body.task-login #login-footer { color: var(--rea-muted); font-size: .875rem; margin-top: 2rem; }
body.task-login #message { z-index: 20; }
body:not(.task-login) #layout-menu { background: var(--rea-dark); }
body:not(.task-login) #taskmenu a { color: #eeede4; }
body:not(.task-login) #taskmenu a:hover, body:not(.task-login) #taskmenu a.selected { color: var(--rea-accent); background: #c1bf8719; }
body:not(.task-login) #taskmenu .special-buttons { background: transparent; }
body:not(.task-login) #layout-sidebar { background: #f6f7fa; }
body:not(.task-login) #layout-sidebar .header, body:not(.task-login) #layout-list .header { background: #fff; border-bottom: 1px solid var(--rea-line); }
body:not(.task-login) #mailboxlist li.selected > a { color: #514c24; background: #efeee0; border-radius: .5rem; font-weight: 600; }
body:not(.task-login) .btn-primary { background: var(--rea-accent); border-color: var(--rea-accent); color: var(--rea-on-accent); }
body:not(.task-login) .listing tbody tr.selected td { background: #efeee0; color: var(--rea-ink); }
body:not(.task-login) a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #817b39; outline-offset: 3px; }
@media (max-width: 960px) {
    body.task-login::before { right: 56%; }
    body.task-login #layout #layout-content { width: 43%; margin-right: 6%; }
}
@media (max-width: 680px) {
    body.task-login::before, body.task-login::after { display: none; }
    body.task-login #layout #layout-content { margin: auto; padding: 2rem 1.5rem; width: 100%; max-width: 29rem; box-sizing: border-box; }
    body.task-login #layout #layout-content #logo { width: 8rem; margin-bottom: 2rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
html.dark-mode body.task-login { background: var(--rea-dark); color: #f0f1f5; }
html.dark-mode body.task-login .form-control { background: #2a2926; color: #f2f1e6; border-color: #57554a; }
html.dark-mode body.task-login .form-control:focus { background: #2a2926; color: #f2f1e6; border-color: var(--rea-accent); }
html.dark-mode body.task-login .input-group-text { background: #2a2926; color: #d0cec3; border-color: #57554a; }
html.dark-mode body:not(.task-login) #layout-sidebar { background: #242320; }
html.dark-mode body:not(.task-login) #layout-sidebar .header,
html.dark-mode body:not(.task-login) #layout-list .header { background: #2a2926; border-color: #48463f; }
html.dark-mode body:not(.task-login) #mailboxlist li.selected > a { color: var(--rea-accent); background: #454332; }
html.dark-mode body:not(.task-login) .listing tbody tr.selected td { background: #454332; color: #f2f1e6; }
html.dark-mode .rea-login-help { color: #b8bdc8; }
html.dark-mode .rea-login-intro h1 { color: var(--rea-accent); }
html.dark-mode .rea-login-help strong { color: #f0f1f5; }
html.dark-mode .rea-login-help a, html.dark-mode .rea-login-help summary { color: var(--rea-accent); }
html.dark-mode body.task-login .rea-provider-option { border-color: #777458; color: var(--rea-accent); }
html.dark-mode body.task-login .rea-provider-option[aria-pressed="true"] { background: #454332; border-color: var(--rea-accent); color: #f2f1e6; }
html.dark-mode .rea-provider-description, html.dark-mode .rea-provider-account { color: #b8bdc8; }
html.dark-mode .rea-provider-page h1, html.dark-mode .rea-current-provider { color: var(--rea-accent); }
html.dark-mode .rea-provider-card { background: #2a2926; border-color: #57554a; color: #f0f1f5; }
html.dark-mode .rea-request-status { background: #454332; color: #f2f1e6; }
html.dark-mode body:not(.task-login) #settings-menu li.selected > a { background: #454332; color: #f2f1e6; }

.rea-microsoft-button { display: flex; align-items: center; justify-content: center; min-height: 48px; width: 100%; padding: 12px 18px; background: var(--rea-accent); color: #1b1919; border-radius: 10px; font-size: 1rem; font-weight: 600; }
.rea-microsoft-button:hover { color: #1b1919; filter: brightness(.96); text-decoration: none; }
.rea-microsoft-button:focus-visible { outline: 3px solid var(--rea-primary-text); outline-offset: 4px; }
