@font-face { font-family: Manrope; src: url("../fonts/manrope-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url("../fonts/manrope-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url("../fonts/manrope-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Manrope; src: url("../fonts/manrope-800.ttf") format("truetype"); font-weight: 800; font-display: swap; }
:root {
  --sie-navy: #182e46; --sie-bar: #102b46; --sie-orange: #f39b3e;
  --sie-ink: #182e46; --sie-muted: #58697b; --sie-bg: #f5f6fa; --sie-surface: #fff;
  --sie-soft: #edf1f7; --sie-line: #dce3eb; --sie-active: #edf1f7; --sie-link: #2b5776;
  --sie-focus: #a95308; --sie-bar-height: 68px; --sie-margin: clamp(16px, 1.7vw, 32px);
}
html.dark-mode {
  --sie-ink: #edf2f8; --sie-muted: #b7c5d3; --sie-bg: #14202d; --sie-surface: #1d2a38;
  --sie-soft: #263748; --sie-line: #3a4c5e; --sie-active: #304458; --sie-link: #a5cced; --sie-focus: #ffb563;
}
html body, html body input, html body textarea, html body select, html body button {
  font-family: Manrope, Arial, sans-serif;
}
html body { color: var(--sie-ink); }
body #sie-kit, body .sie-unread[hidden] { display: none !important; }
html body :is(a,button,input,select,textarea):focus-visible { outline: 2px solid var(--sie-focus); outline-offset: 1px; }
html body .btn.btn-primary, html body .floating-action-buttons a.button {
  background-color: var(--sie-navy); border-color: var(--sie-navy); color: white;
}
html body .btn.btn-primary:hover { background-color: #2b4965; border-color: #2b4965; }
html body #layout-menu, html body #layout-menu #taskmenu .special-buttons { background-color: var(--sie-bar); }
html body #layout-menu #taskmenu a.selected { background-color: #2c435a; color: white; }
html body #layout-menu #taskmenu .action-buttons a { color: #fff; background-color: #263f59; }
html body #layout-menu #taskmenu a.compose::before { color: var(--sie-orange); }
html body #layout-menu .popover-header { background-color: white !important; }
html body #layout-menu .popover-header img { background: white; }
html body .folderlist li.selected > a, html body .listing li.selected > a:not(.disabled) {
  color: var(--sie-ink); background-color: var(--sie-active); font-weight: 800;
}
html body #mailboxlist li.selected > a { box-shadow: inset 3px 0 var(--sie-orange); }
html body #mailboxlist .unreadcount {
  border-radius: 5px; background: var(--sie-soft); color: var(--sie-ink); font-weight: 800; line-height: 1.5;
}
html body #mailboxlist li.selected > a .unreadcount { background: #ffe1b9; color: #744009; }
html body #messagelist { border-color: var(--sie-line); }
html body #messagelist tr.message td { border-color: var(--sie-line); background-color: var(--sie-surface); }
html body #messagelist tr.message:hover td { background-color: var(--sie-soft); }
html body #messagelist tr.message.selected td { color: var(--sie-ink); background-color: var(--sie-active); }
html body #messagelist tr.message.selected td:first-child { box-shadow: inset 3px 0 var(--sie-orange); }
html body #messagelist td.subject span.fromto, html body #messagelist td.subject span.date { color: var(--sie-muted); }
html body #messagelist td.subject span.fromto { color: var(--sie-ink); font-weight: 600; }
html body #messagelist tr.unread td.subject span.fromto, html body #messagelist tr.unread td.subject span.subject { font-weight: 800; }
html body #messagelist tr.unread .msgicon.status.unread::before { color: #ba660f; }
html body #messagelist tr.flagged:not(.deleted) td.flags span.flag { color: #ac600c; }
html body .sie-initials, html body .sie-compose-short { display: none; }
html body .sie-initials, html body .sie-sender-initials { background: #e5edf6; color: #2a4864; font-weight: 800; }
html body [class^="sie-"][data-tone="1"] { background: #ffe5cb; color: #6c4019; }
html body [class^="sie-"][data-tone="2"] { background: #e5eced; color: #40545a; }
html body #message-header .sie-sender-initials {
  flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; margin-right: 1rem; font-size: 1.05rem;
}
html body #message-header img.contactphoto[src*="/images/contactpic.svg"]:has(+ .sie-sender-initials),
html body #message-header img.contactphoto:not([src*="/images/contactpic.svg"]) + .sie-sender-initials { display: none; }
html body #message-header > h2.subject {
  color: var(--sie-ink); font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.27;
  font-weight: 800; letter-spacing: -.04em; margin-bottom: 1.05rem;
}
html body #message-header { border-bottom: 1px solid var(--sie-line); padding-bottom: 1.1rem; margin-bottom: 1.35rem; }
html body #message-header .header-content a { color: var(--sie-link); }
html body #message-header .header-summary .rcmContactAddress { color: var(--sie-ink); font-weight: 700; }
html body #message-header h2.subject .extwin { color: var(--sie-muted); font-size: .8em; }
html body #message-header .header img.contactphoto { background-color: var(--sie-soft); width: 42px; height: 42px; }
html body.task-mail :is(.frame-content:has(#message-header)) { padding: clamp(18px, 3.7%, 36px); }
html body #messagebody .message-part { font-family: Manrope, Arial, sans-serif; }
html body #messagebody .message-part > div.pre { font-family: inherit; font-size: 1.05rem; line-height: 1.7; }
html body #message-content .attachmentslist:not(:empty) {
  padding: 6px 9px; border: 1px solid var(--sie-line); background: var(--sie-surface); border-radius: 8px;
}
html body #message-content:has(> .leftcol > #attachment-list:not(:empty)) { display: flex; flex-direction: column; }
html body #message-content > .leftcol:has(#attachment-list:not(:empty)) { order: 2; width: 100%; margin: 1.1rem 0 0; float: none; }
html body #message-content > .rightcol { min-width: 0; }

/* Formulario nativo, con su token, sus campos y su destino originales. */
html body.task-login #layout, html body.task-login #layout-content { background: var(--sie-bg); }
html body.task-login #layout-content #logo {
  width: min(215px, 65vw); height: auto; max-height: none; max-width: 80%; padding: 8px 11px;
  border-radius: 6px; background: white; box-sizing: content-box;
}
html body.task-login #login-form { color: var(--sie-ink); }
html body.task-login #login-form input.form-control { border-color: var(--sie-line); }
html body.task-login #login-form button { border-radius: 7px; min-height: 42px; font-weight: 700; }
html body.task-login #login-footer { color: var(--sie-muted); }

@media screen and (min-width: 481px) {
  html body #layout:not(.sie-wide) > #layout-menu #logo {
    content: url("../images/sello-sie.png"); width: 34px; max-width: 90%; height: auto;
  }
}
@media screen and (max-width: 1200px) {
  html body.task-mail #layout > #layout-list > .header,
  html body.task-mail #layout > #layout-content > .header,
  html body.task-mail #layout > #layout-sidebar > .header {
    background: var(--sie-bar); color: white; border-color: #38516a;
  }
  html body.task-mail #layout > div > .header :is(a.button,.header-title,.toolbar a) { color: #fff; }
  html body.task-mail #layout > div > .header a.disabled { opacity: .65; }
  html body.task-mail #layout > div > .searchbar { background: var(--sie-surface); border-color: var(--sie-line); }
  html body #messagelist tr.message td.subject { padding-top: .4rem; padding-bottom: .4rem; }
  html body #layout.sie-compact #messagelist-header > .header-title { display: none; }
  #layout.sie-compact .sie-compact-brand { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.08rem; font-weight: 800; }
  #layout.sie-compact .sie-compact-brand img { width: 26px; height: 26px; border-radius: 50%; }
  #layout.sie-compact .sie-summary {
    display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 13px;
    color: var(--sie-ink); background: var(--sie-bg); border-bottom: 1px solid var(--sie-line);
  }
  #layout.sie-compact .sie-summary > div { min-width: 0; }
  #layout.sie-compact .sie-folder-title { margin: 0; font-size: clamp(1.2rem, 5.3vw, 1.65rem); font-weight: 800; letter-spacing: -.04em; overflow-wrap: anywhere; }
  #layout.sie-compact .sie-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; color: var(--sie-muted); font-size: .86rem; }
  #layout.sie-compact .sie-unread::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--sie-orange); }
  #layout.sie-compact .sie-date { display: none; }
  #layout.sie-compact .sie-compose-short {
    display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px;
    border-radius: 7px; background: var(--sie-navy); color: white; font-size: .92rem; font-weight: 700; text-decoration: none;
  }
  #layout.sie-compact .sie-compose-short::before { content: "\f044"; font: 900 1rem Icons; color: var(--sie-orange); }
  #layout.sie-compact .sie-filters { flex: none; display: flex; gap: 4px; padding: 0 8px; background: var(--sie-surface); border-bottom: 1px solid var(--sie-line); }
  #layout.sie-compact .sie-filters button { border: 0; border-bottom: 3px solid transparent; padding: 0 10px; min-height: 38px; color: var(--sie-muted); background: transparent; font-size: .92rem; }
  #layout.sie-compact .sie-filters button[aria-pressed="true"] { border-bottom-color: var(--sie-orange); color: var(--sie-ink); font-weight: 800; }
  #layout.sie-compact #messagelist td.subject.sie-has-initials { position: relative; padding-left: 48px; }
  #layout.sie-compact #messagelist td.subject span.fromto { padding-left: 0; }
  #layout.sie-compact #messagelist .sie-initials { position: absolute; top: 50%; left: 8px; transform: translateY(-50%); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: .78rem; }
  html:is(.layout-phone,.touch) body #messagelist tr.message td.flags { background-color: transparent; }
  #layout.sie-compact .searchbar a.unread { display: none; }
}
@media screen and (min-width: 1201px) {
  html body #layout.sie-wide {
    position: relative; isolation: isolate; box-sizing: border-box; padding: var(--sie-bar-height) var(--sie-margin) 0 0;
    background: var(--sie-bg); --sie-summary-height: 104px; --sie-side: clamp(210px, 17vw, 280px);
  }
  #layout.sie-wide > #layout-menu {
    position: absolute; inset: 0 0 auto; width: 100%; height: var(--sie-bar-height); z-index: 3;
    display: flex; align-items: center; padding: 0 var(--sie-margin) 0 0; background: var(--sie-bar);
  }
  #layout.sie-wide > #layout-menu > .popover-header {
    display: flex !important; align-items: center; justify-content: center; flex: 0 0 var(--sie-side);
    height: 100%; background-color: #fff !important; border-bottom: 1px solid var(--sie-line); margin: 0;
  }
  #layout.sie-wide #layout-menu #logo { width: min(170px, 79%); max-width: 79%; max-height: 54px; padding: 0; height: auto; }
  #layout.sie-wide #taskmenu {
    position: static; flex: 1; display: flex; align-items: center; min-width: 0; height: 100%;
    gap: 3px; padding-left: var(--sie-margin); background: none;
  }
  #layout.sie-wide #taskmenu a:not(.button) {
    border: 0; width: 36px; min-width: 0; height: 37px; min-height: 0; line-height: 37px; display: inline-flex;
    align-items: center; justify-content: center; padding: 0; color: #f4f7fb; background: transparent; border-radius: 6px; margin: 0;
  }
  #layout.sie-wide #taskmenu a:not(.button):hover, #layout.sie-wide #taskmenu a:focus-visible { color: white; background-color: #34516b; }
  #layout.sie-wide #taskmenu a:not(.button)::before { display: block; float: none; height: auto; margin: 0; line-height: 1; font-size: 16px; }
  #layout.sie-wide #taskmenu a:not(.mail):not(.button) .inner {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  #layout.sie-wide #taskmenu a.mail {
    width: auto; flex: none; padding: 0 .6rem 0 0; gap: 9px; font-size: 1.35rem; font-weight: 800; letter-spacing: -.035em;
  }
  #layout.sie-wide #taskmenu a.mail::before { font-size: 1.2rem; color: #fff; }
  #layout.sie-wide #taskmenu a.mail .inner { display: inline; line-height: normal; font-size: inherit; font-weight: 800; }
  #layout.sie-wide #taskmenu .special-buttons { position: static; display: flex; align-items: center; width: auto; height: auto; background: transparent; }
  #layout.sie-wide #taskmenu a.logout { color: #f3d9bc !important; }
  #layout.sie-wide #taskmenu .searchbar {
    display: flex; align-items: center; margin: 0 auto 0 12px; width: clamp(215px, 24vw, 450px); min-width: 160px;
    height: 39px; min-height: 39px; line-height: 38px; border: 1px solid #53697f; border-radius: 7px; background: #2d455d;
  }
  #layout.sie-wide #taskmenu .searchbar form { min-width: 0; margin: 0; }
  #layout.sie-wide #taskmenu .searchbar form::before, #layout.sie-wide #taskmenu .searchbar :is(a,input) { color: white; }
  #layout.sie-wide #taskmenu .searchbar input { width: 100%; min-width: 0; font-size: .95rem; color: white; }
  #layout.sie-wide #taskmenu .searchbar input::placeholder { color: #e1e9f1; }
  #layout.sie-wide #taskmenu .searchbar:focus-within { outline: 2px solid var(--sie-orange); outline-offset: 2px; }
  #layout.sie-wide #taskmenu .searchbar a.button {
    min-width: 0; width: 30px; height: 35px; line-height: 35px; padding: 0; color: #d9e5f0; background: transparent;
  }
  #layout.sie-wide #taskmenu .searchbar a.button::before { font-size: .95rem; line-height: 35px; height: 35px; }
  #layout.sie-wide #taskmenu .searchbar a.button .inner, #layout.sie-wide #taskmenu .searchbar a.unread { display: none; }
  #layout.sie-wide #taskmenu .searchbar:not(.active) a.reset, #layout.sie-wide #taskmenu .searchbar a.search { display: none; }
  #layout.sie-wide .sie-account { display: flex; align-items: center; min-width: 0; gap: 8px; margin-left: 10px; color: white; font-size: .85rem; }
  #layout.sie-wide .sie-account-mark {
    display: grid; place-items: center; flex: 0 0 30px; height: 30px; background: #e6edf5; color: var(--sie-navy); border-radius: 50%; font-size: 11px; font-weight: 800;
  }
  #layout.sie-wide .sie-account-name { display: block; max-width: 15vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  #layout.sie-wide > #layout-sidebar {
    box-sizing: border-box; flex: 0 0 auto; width: clamp(210px, 17vw, 280px); min-width: 190px;
    background: var(--sie-surface); border-color: var(--sie-line);
  }
  #layout.sie-wide #layout-sidebar > .action-buttons { display: block; flex: none; padding: 20px 14px 14px; }
  #layout.sie-wide #layout-sidebar .action-buttons a.compose {
    min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 8px; background: var(--sie-navy); color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none;
  }
  #layout.sie-wide #layout-sidebar .action-buttons a.compose::before { font: 900 1.1rem Icons; content: "\f044"; color: var(--sie-orange); }
  #layout.sie-wide #layout-sidebar .action-buttons a.compose:hover { background: #2b4965; }
  #layout.sie-wide #layout-sidebar > .header {
    background-color: var(--sie-surface); color: var(--sie-muted); padding: 0 12px 0 22px;
    align-items: center; height: 38px; min-height: 38px; border: 0; gap: 4px;
  }
  #layout.sie-wide #layout-sidebar > .header .username { display: none; }
  #layout.sie-wide #layout-sidebar > .header a.sidebar-menu { height: 32px; line-height: 32px; }
  #layout.sie-wide #layout-sidebar > .header a.sidebar-menu::before { height: 32px; line-height: 32px; }
  #layout.sie-wide .sie-folder-label { margin-right: auto; font-weight: 800; font-size: .85rem; }
  #layout.sie-wide #mailboxlist { padding: 0 12px; }
  #layout.sie-wide #mailboxlist li { border: 0; background: none; }
  #layout.sie-wide #mailboxlist li > a {
    border: 0; border-radius: 7px; margin: 2px 0; min-height: 39px; line-height: 39px; color: var(--sie-ink); font-size: .98rem;
  }
  #layout.sie-wide #mailboxlist li > a:hover { background-color: var(--sie-soft); }
  #layout.sie-wide #mailboxlist li.selected > a { background-color: var(--sie-active); }
  #layout.sie-wide #layout-sidebar > .footer { background: var(--sie-surface); border-color: var(--sie-line); color: var(--sie-muted); }
  #layout.sie-wide > .sie-summary {
    position: absolute; inset: var(--sie-bar-height) var(--sie-margin) auto calc(var(--sie-side) + var(--sie-margin));
    height: var(--sie-summary-height); display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0;
  }
  #layout.sie-wide .sie-summary > div { min-width: 0; }
  #layout.sie-wide .sie-folder-title {
    color: var(--sie-ink); margin: 0; font-size: clamp(1.8rem, 2.2vw, 2.65rem); font-weight: 800; letter-spacing: -.045em;
    line-height: 1.22; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  }
  #layout.sie-wide .sie-counts, #layout.sie-wide .sie-date { display: flex; align-items: center; gap: 12px; color: var(--sie-muted); font-size: .88rem; margin: 5px 0 0; }
  #layout.sie-wide .sie-unread:not([hidden]) { display: flex; align-items: center; gap: 6px; }
  #layout.sie-wide .sie-unread::before { content: ""; border-radius: 50%; width: 7px; height: 7px; background: var(--sie-orange); }
  #layout.sie-wide .sie-date { white-space: nowrap; margin: 0; }
  #layout.sie-wide .sie-date::before { content: "\f133"; font: 400 1.05rem Icons; }
  #layout.sie-wide > #layout-list, #layout.sie-wide > #layout-content {
    margin-top: var(--sie-summary-height); margin-bottom: var(--sie-margin); min-height: 0; background: var(--sie-surface);
    border: 1px solid var(--sie-line); overflow: clip;
  }
  #layout.sie-wide > #layout-list {
    max-width: 45%; min-width: 285px; margin-left: var(--sie-margin); border-radius: 9px 0 0 9px; flex: 3.6;
  }
  #layout.sie-wide > #layout-content { min-width: 0; flex: 6; border-left: 0; border-radius: 0 9px 9px 0; }
  #layout.sie-wide > #layout-list > .header, #layout.sie-wide > #layout-content > .header {
    box-sizing: border-box; height: 54px; min-height: 54px; line-height: 54px; align-items: center;
    background: var(--sie-surface); color: var(--sie-ink); border-color: var(--sie-line); padding-inline: 9px;
  }
  #layout.sie-wide > #layout-list > .header { justify-content: flex-start; }
  #layout.sie-wide .sie-filters { display: inline-flex; align-self: stretch; gap: 3px; margin-right: auto; }
  #layout.sie-wide .sie-filters button {
    appearance: none; position: relative; color: var(--sie-muted); background: transparent; border: 0; border-radius: 0;
    padding: 0 8px; line-height: 1.3; font-size: .9rem; font-weight: 600; cursor: pointer;
  }
  #layout.sie-wide .sie-filters button[aria-pressed="true"] { color: var(--sie-ink); font-weight: 800; }
  #layout.sie-wide .sie-filters button[aria-pressed="true"]::after { content: ""; position: absolute; height: 3px; inset: auto 5px 0; background: var(--sie-orange); }
  #layout.sie-wide #messagelist-header > .toolbar a { min-width: 30px; padding-inline: 4px; }
  #layout.sie-wide #messagelist-header > .toolbar a .inner { position: absolute; clip-path: inset(50%); width: 1px; overflow: hidden; }
  #layout.sie-wide #messagelist-header > .toolbar a::before { line-height: 1.2; }
  #layout.sie-wide #layout-list .pagenav { border-color: var(--sie-line); background: var(--sie-surface); }
  #layout.sie-wide :is(#toolbar-menu,#toolbar-list-menu) { display: flex; align-items: center; height: 100%; line-height: normal; }
  #layout.sie-wide :is(#toolbar-menu,#toolbar-list-menu) li { height: 40px; line-height: normal; border: 0; }
  #layout.sie-wide :is(#toolbar-menu,#toolbar-list-menu) li a { min-width: 32px; height: 40px; line-height: 40px; padding: 0 6px; color: var(--sie-ink); border-radius: 5px; }
  #layout.sie-wide :is(#toolbar-menu,#toolbar-list-menu) li a::before { display: inline-block; height: 40px !important; line-height: 40px; font-size: 15px; }
  #layout.sie-wide #toolbar-menu a.dropdown { padding: 0 2px; min-width: 13px; }
  #layout.sie-wide #toolbar-menu a.dropdown::before { line-height: 40px; font-size: .72rem; }
  #layout.sie-wide #toolbar-menu a .inner { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #layout.sie-wide #toolbar-menu a:is(.reply,.forward) .inner { position: static; width: auto; height: auto; clip-path: none; vertical-align: top; margin-left: 6px; font-size: .9rem; font-weight: 600; }
  #layout.sie-wide #toolbar-menu li a:is(.reply,.forward) { width: max-content; max-width: none; }
  #layout.sie-wide > #layout-content > .header { justify-content: flex-start; }
  #layout.sie-wide #toolbar-menu { width: 100%; }
  #layout.sie-wide #toolbar-menu .spacer { margin-left: auto; }
  #layout.sie-wide #messagelist-header > .refresh { height: 40px; width: 35px; line-height: 40px; padding: 0; }
  #layout.sie-wide #messagelist-header > .refresh::before { line-height: 40px; height: 40px !important; }
  #layout.sie-wide #messagelist-header > .refresh .inner { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #layout.sie-wide #messagelist tr.message td { padding-top: .72rem; padding-bottom: .72rem; }
  #layout.sie-wide #messagelist td.subject.sie-has-initials { position: relative; padding-left: 45px; }
  #layout.sie-wide #messagelist .sie-initials {
    position: absolute; left: 5px; top: 50%; transform: translateY(-50%); width: 31px; height: 31px; display: grid;
    place-items: center; border-radius: 50%; background: #e5edf6; color: #2a4864; font-weight: 800; font-size: .76rem; line-height: 1;
  }
  #layout.sie-wide #messagelist .sie-initials[data-tone="1"] { background: #ffe5cb; color: #6c4019; }
  #layout.sie-wide #messagelist .sie-initials[data-tone="2"] { background: #ebece9; color: #4e5b58; }
  #layout.sie-wide #messagelist td.subject span.fromto { padding-left: 0; }
  #layout.sie-wide #messagelist td.flags { width: 1.7rem; }
  #layout.sie-wide #messagelist tr.message.selected td.subject { box-shadow: inset 3px 0 var(--sie-orange); }
  #layout.sie-wide > #layout-content { container-type: inline-size; }
  @container (max-width: 430px) {
    #layout.sie-wide #toolbar-menu a:is(.reply,.forward) .inner { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  }
}
