/* Larry Fresh: a separate skin extending Larry for Roundcube 1.6.x.
   Dark operations header and folder rail, with Larry's navigation intact. */
:root {
  --lf-blue: #005ff9;
  --lf-blue-hover: #004ed0;
  --lf-blue-soft: #eaf2ff;
  --lf-ink: #202b3b;
  --lf-muted: #526176;
  --lf-line: #e3e9f1;
  --lf-surface: #ffffff;
  --lf-sidebar: #f7f9fc;
  --lf-page: #f2f5fa;
}

html, body, input, button, select, textarea {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
#messagelist, #mailboxlist, .records-table, .listing,
.toolbar, #taskbar { font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; }

body { color: var(--lf-ink); background: var(--lf-page); }
a { color: var(--lf-blue); }

/* Header: remove Larry's dark bar but keep every existing command. */
#header { overflow-x: visible; }
#topline {
  box-sizing: border-box;
  height: 32px;
  padding: 7px 24px 0;
  color: var(--lf-muted);
  background: var(--lf-surface);
  border-bottom: 1px solid var(--lf-line);
}
#topline a, #topline .topleft a, #topline a.button-logout {
  color: var(--lf-muted);
}
#topline a.button-logout { background-image: none; padding-left: 10px; }
#topnav {
  box-sizing: border-box;
  height: 64px;
  margin: 0;
  padding: 0 24px;
  background: var(--lf-surface);
  border-bottom: 1px solid var(--lf-line);
}
#toplogo { max-height: 52px; max-width: 210px; padding-top: 5px; }
#topnav a { color: var(--lf-muted); }
#taskbar { padding-right: 18px; }
#taskbar a {
  box-sizing: border-box;
  height: 50px;
  margin: 7px 2px;
  padding: 12px 15px;
  border-radius: 10px;
  color: var(--lf-muted);
}
#taskbar a span.button-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: auto;
  padding: 0;
  background-image: none;
  font-size: 13px;
  font-weight: 600;
}
#taskbar a:hover, #taskbar a:focus,
#taskbar a.button-selected {
  color: var(--lf-blue);
  background: var(--lf-blue-soft);
  outline: none;
}
#taskbar a span.button-inner::before {
  content: "";
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: var(--lf-task-icon) center / contain no-repeat;
  mask: var(--lf-task-icon) center / contain no-repeat;
}
#taskbar a.button-mail { --lf-task-icon: url(icons/mail.svg); }
#taskbar a.button-addressbook { --lf-task-icon: url(icons/contacts.svg); }
#taskbar a.button-settings { --lf-task-icon: url(icons/settings.svg); }
.minimal #taskbar a span.button-inner { font-size: 0; }
.minimal #taskbar a span.button-inner::before { width: 22px; height: 22px; }
#taskbar .minmodetoggle { opacity: .35; }

/* The original panes and layout options are retained. */
#mainscreen { top: 112px; left: 20px; right: 20px; bottom: 20px; }
#mainscreen.offset { top: 156px; }
.minimal #mainscreen { top: 80px; }
.minimal #mainscreen.offset { top: 120px; }
.extwin #mainscreen { top: 42px; }
.extwin #mainscreen.offset { top: 88px; }
#mainscreencontent { top: 52px; }
#mainscreen .offset { top: 52px; }
.uibox { border: 1px solid var(--lf-line); border-radius: 12px; background: var(--lf-surface); }
.listbox { background: var(--lf-sidebar); }
#mailview-left { width: 220px; }
#mailview-right { left: 232px; }
#mailview-right.fullwidth { left: 0; }
.widescreen #mailview-bottom { border-color: var(--lf-line); }

/* Folders. */
.listbox .listitem, .listbox .tablink, .listing li { border-bottom-color: transparent; }
ul.folderlist li.mailbox { background-color: transparent; }
ul.folderlist li.mailbox.selected { background-color: var(--lf-blue-soft); }
.listbox .listitem a, .listbox .listitem span,
.listbox .tablink a, .listing li a {
  color: var(--lf-ink);
  border-radius: 8px;
}
.listbox .listitem a:hover, .listbox .tablink a:hover,
.listing li a:hover { color: var(--lf-blue); background: var(--lf-blue-soft); }
.listbox .listitem.selected, .listbox .tablink.selected,
.listbox .listitem.selected > a, .listbox .tablink.selected > a,
.listing li.selected, .listing li.selected > a {
  color: var(--lf-blue);
  background: var(--lf-blue-soft);
}
.folderlist li.mailbox > a {
  position: relative;
  background-image: none !important;
}
.folderlist li.mailbox > a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-color: currentColor;
  -webkit-mask: var(--lf-folder-icon, url(icons/folder.svg)) center / contain no-repeat;
  mask: var(--lf-folder-icon, url(icons/folder.svg)) center / contain no-repeat;
  opacity: .8;
}
.folderlist li.mailbox ul li.mailbox > a::before { left: 27px; }
.folderlist li.mailbox.inbox { --lf-folder-icon: url(icons/inbox.svg); }
.folderlist li.mailbox.drafts { --lf-folder-icon: url(icons/drafts.svg); }
.folderlist li.mailbox.sent { --lf-folder-icon: url(icons/sent.svg); }
.folderlist li.mailbox.archive { --lf-folder-icon: url(icons/archive.svg); }
.folderlist li.mailbox.junk { --lf-folder-icon: url(icons/spam.svg); }
.folderlist li.mailbox.trash { --lf-folder-icon: url(icons/trash.svg); }
.folderlist li.mailbox.selected > a::before { opacity: 1; }
.folderlist li.mailbox .unreadcount,
.folderlist li.mailbox.selected > a .unreadcount,
.folderlist li.mailbox.recent > a .unreadcount {
  color: var(--lf-blue);
  background: #dceaff;
  border-radius: 7px;
  font-size: 11px;
}
.listbox .boxfooter, .uibox .boxfooter {
  background: var(--lf-sidebar);
  border-top: 1px solid var(--lf-line);
}

/* Messages and controls. */
#messagetoolbar { top: 0; }
.toolbar a.button { color: #3b4d66; }
#messagetoolbar a.button:is(.checkmail, .compose, .reply, .reply-all,
  .forward, .delete, .archive, .junk, .markmessage, .more, .move, .print) {
  position: relative;
  background-image: none;
}
#messagetoolbar a.button:is(.checkmail, .compose, .reply, .reply-all,
  .forward, .delete, .archive, .junk, .markmessage, .more, .move, .print)::before {
  content: "";
  position: absolute;
  top: 5px;
  left: calc(50% - 9px);
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: var(--lf-action-icon) center / contain no-repeat;
  mask: var(--lf-action-icon) center / contain no-repeat;
}
#messagetoolbar .checkmail { --lf-action-icon: url(icons/refresh.svg); }
#messagetoolbar .compose { --lf-action-icon: url(icons/compose.svg); }
#messagetoolbar .reply { --lf-action-icon: url(icons/reply.svg); }
#messagetoolbar .reply-all { --lf-action-icon: url(icons/reply-all.svg); }
#messagetoolbar .forward { --lf-action-icon: url(icons/forward.svg); }
#messagetoolbar .delete { --lf-action-icon: url(icons/trash.svg); }
#messagetoolbar .archive { --lf-action-icon: url(icons/archive.svg); }
#messagetoolbar .junk { --lf-action-icon: url(icons/spam.svg); }
#messagetoolbar .markmessage { --lf-action-icon: url(icons/mark.svg); }
#messagetoolbar .more { --lf-action-icon: url(icons/more.svg); }
#messagetoolbar .move { --lf-action-icon: url(icons/move.svg); }
#messagetoolbar .print { --lf-action-icon: url(icons/print.svg); }
.dropbutton .dropbuttontip { background-image: none; }
.dropbutton .dropbuttontip::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 6px;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--lf-muted);
  border-bottom: 1.5px solid var(--lf-muted);
  transform: rotate(45deg);
}
#messagetoolbar a.button.compose:not(.disabled) {
  color: #fff;
  background-color: var(--lf-blue);
  border-radius: 8px;
}
#messagetoolbar a.button.compose:not(.disabled):hover,
#messagetoolbar a.button.compose:not(.disabled):focus {
  color: #fff;
  background-color: var(--lf-blue-hover);
}
.toolbar a.button:hover:not(.disabled),
.toolbar a.button:focus:not(.disabled) {
  color: var(--lf-blue);
  background-color: var(--lf-blue-soft);
  border-radius: 8px;
}
#quicksearchbar {
  background-color: var(--lf-surface);
  border: 1px solid var(--lf-line);
  border-radius: 9px;
  box-shadow: none;
}
#quicksearchbar input { color: var(--lf-ink); }
.uibox .boxtitle, .uibox .listing thead th,
.uibox .listing thead td, .records-table thead th,
.records-table thead td {
  color: var(--lf-muted);
  background: var(--lf-sidebar);
  border-color: var(--lf-line);
}
.records-table thead th a, .records-table thead td a,
.records-table thead th span, .records-table thead td span { color: var(--lf-muted); }
.records-table tbody td {
  height: 29px;
  padding-top: 5px;
  padding-bottom: 5px;
  color: var(--lf-ink);
  border-bottom: 1px solid var(--lf-line);
  border-left-color: transparent;
}
.records-table tbody tr:hover td { background: #f8fbff; }
.records-table tr.selected td,
.records-table.focus tr.selected td { color: var(--lf-ink) !important; background: var(--lf-blue-soft) !important; }
.records-table tr.selected td a,
.records-table tr.selected td span { color: var(--lf-ink) !important; }
.records-table.focus tbody tr.focused > td:first-child,
.listing.focus tbody tr.focused > td:first-child { border-left-color: var(--lf-blue); }
#messagelistfooter, .widescreen #messagelistheader {
  background: var(--lf-sidebar);
  border-color: var(--lf-line);
}

/* Forms and dialogs shared by mail, contacts, and settings. */
input[type="text"], input[type="email"], input[type="password"],
textarea, select {
  border-color: #cfd9e6;
  border-radius: 7px;
}
input:focus, textarea:focus, select:focus,
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--lf-blue);
  outline-offset: 2px;
}
a.button, button, input[type="submit"] { border-radius: 8px; }

/* Operations layout: high-contrast header and folder rail. */
body:not(.lf-login-page) { background: #eaf1f6; }
body:not(.lf-login-page) #topline,
body:not(.lf-login-page) #topnav {
  color: #d7e8f4;
  background: #142c42;
  border-bottom-color: #28485f;
}
body:not(.lf-login-page) #topline a,
body:not(.lf-login-page) #topline .topleft a,
body:not(.lf-login-page) #topline span.username,
body:not(.lf-login-page) #topline a.button-logout { color: #c5d7e5; }
body:not(.lf-login-page) #topline a:hover { color: #fff; }
body:not(.lf-login-page) #toplogo {
  box-sizing: border-box;
  width: 112px;
  height: 54px;
  max-height: 54px;
  margin-top: 4px;
  padding: 3px 5px;
  border-radius: 9px;
  background: #fff;
  object-fit: contain;
}
body:not(.lf-login-page) #taskbar a { color: #bfd4e4; }
body:not(.lf-login-page) #taskbar a:hover,
body:not(.lf-login-page) #taskbar a:focus,
body:not(.lf-login-page) #taskbar a.button-selected {
  color: #fff;
  background: #294a65;
}
body:not(.lf-login-page) #taskbar .minmodetoggle { opacity: .65; }
body:not(.lf-login-page) #mainscreencontent #mailboxcontainer {
  color: #d8e7f1;
  background: #17334a;
  border-color: #17334a;
}
body:not(.lf-login-page) #mailboxcontainer #folderlist-content { background: #17334a; }
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox { background: transparent; }
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a {
  color: #d8e7f1;
  background: transparent;
  border-radius: 8px;
}
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a:hover,
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a:focus {
  color: #fff;
  background: #244760;
}
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox.selected > a {
  color: #fff;
  background: #2a5879;
  font-weight: 700;
}
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox .unreadcount {
  color: #fff;
  background: #0878c5;
  border-radius: 12px;
}
body:not(.lf-login-page) #mailboxcontainer .treetoggle { filter: brightness(0) invert(1); opacity: .7; }
body:not(.lf-login-page) #mailboxcontainer .boxfooter {
  background: #17334a;
  border-top-color: #2a4a61;
}
body:not(.lf-login-page) #mailboxcontainer .boxfooter a { color: #d8e7f1; }
body:not(.lf-login-page) #mailboxcontainer .boxfooter a:hover { background: #2a5879; }
body:not(.lf-login-page) #mailboxcontainer #mailboxmenulink {
  color: #d8e7f1;
  background: #244760;
}
body:not(.lf-login-page) #mailboxcontainer #mailboxmenulink .inner {
  background-image: none;
  color: #d8e7f1;
  font-size: 23px;
  line-height: 35px;
  text-align: center;
  text-indent: 0;
}
body:not(.lf-login-page) #mailview-top,
body:not(.lf-login-page) #mailview-bottom { border-color: #d7e2eb; }
body:not(.lf-login-page) #mailview-bottom:has(#messagecontframe[src$="watermark.html"])::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: calc(50% - 44px);
  left: calc(50% - 18px);
  width: 36px;
  height: 36px;
  background: #a9bfd0;
  -webkit-mask: url(icons/mail.svg) center / contain no-repeat;
  mask: url(icons/mail.svg) center / contain no-repeat;
  pointer-events: none;
}
body:not(.lf-login-page) #mailview-bottom:has(#messagecontframe[src$="watermark.html"])::after {
  content: "Выберите письмо для просмотра";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 52px 20px 0;
  color: #70839a;
  background: #fff;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}
body:not(.lf-login-page) #messagetoolbar a.button.compose:not(.disabled) { background: #0876cf; border-radius: 8px; }
body:not(.lf-login-page) #messagetoolbar a.button.compose:not(.disabled):hover { background: #0064b8; }
body:not(.lf-login-page) #quicksearchbar { background: #fff; border-color: #ccdbe7; }
body:not(.lf-login-page) .records-table tbody tr:hover td { background: #f0f7fd; }
body:not(.lf-login-page) .records-table tr.selected td,
body:not(.lf-login-page) .records-table.focus tr.selected td { background: #e5f3ff !important; }

/* Login. */
#login-form { width: 520px; max-width: calc(100vw - 32px); margin: max(8vh, 50px) auto 24px; }
#login-form .box-inner {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 28px 36px 32px;
  color: var(--lf-ink);
  background: var(--lf-surface);
  border: 1px solid var(--lf-line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(32, 51, 84, .08);
}
#login-form td.title { color: var(--lf-muted); }
#login-form input[type="text"], #login-form input[type="email"],
#login-form input[type="password"] {
  box-sizing: border-box;
  min-height: 42px;
  border: 1px solid #cfd9e6;
  background: #fff;
}
#login-form .button {
  min-height: 42px;
  padding: 0 24px;
  color: #fff;
  background: var(--lf-blue);
  border: 1px solid var(--lf-blue);
  font-weight: 600;
}
#login-form .button:hover { color: #fff; background: var(--lf-blue-hover); }
#login-form .box-bottom, #bottomline { color: var(--lf-muted); }

@media (max-width: 1100px) {
  #mainscreen { left: 10px; right: 10px; }
  #mailview-left { width: 190px; }
  #mailview-right { left: 202px; }
  .widescreen #mailview-top { width: 340px; }
  .widescreen #mailview-bottom { left: 352px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}

/* Login page. */
body.lf-login-page {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  background: #d7e4ed url(images/login-powerlines.webp) center center / cover no-repeat;
}
.lf-login-shell {
  box-sizing: border-box;
  width: min(100% - 32px, 450px);
  margin: clamp(54px, 14vh, 138px) auto 36px;
}
.lf-login-shell #login-form {
  width: 100%;
  max-width: none;
  margin: 0;
}
.lf-login-shell #login-form .box-inner {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 32px 36px 34px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 16px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 22px 70px rgba(15, 35, 60, .25);
}
.lf-login-brand { display: flex; align-items: center; justify-content: center; min-height: 138px; margin-bottom: 17px; }
.lf-login-shell #login-form #logo {
  display: block;
  width: 160px;
  max-height: none;
  object-fit: contain;
  margin: 0;
}
.lf-login-shell #login-form form table,
.lf-login-shell #login-form form tbody,
.lf-login-shell #login-form form tr,
.lf-login-shell #login-form form td { display: block; width: 100%; }
.lf-login-shell #login-form form tr { margin: 0 0 17px; }
.lf-login-shell #login-form td.title {
  display: none;
}
.lf-login-shell #login-form td.input { box-sizing: border-box; padding: 0; }
.lf-login-shell #login-form input[type="text"],
.lf-login-shell #login-form input[type="email"],
.lf-login-shell #login-form input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #c6d3e4;
  border-radius: 9px;
  background: #fff;
  color: var(--lf-ink);
  font-size: 16px;
  box-shadow: none;
}
.lf-login-shell #login-form input::placeholder { color: #71839a; opacity: 1; }
.lf-login-shell #login-form input:focus {
  border-color: var(--lf-blue);
  outline: 3px solid rgba(0,95,249,.16);
  outline-offset: 0;
}
.lf-login-shell #login-form p.formbuttons { margin: 26px 0 0; }
.lf-login-shell #login-form .button {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  color: #fff;
  background: var(--lf-blue);
  border: 1px solid var(--lf-blue);
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.lf-login-shell #login-form .button:hover,
.lf-login-shell #login-form .button:focus { background: var(--lf-blue-hover); }
.lf-login-shell #login-form .box-bottom { margin: 0; padding: 0; }
.lf-login-shell #login-form #message { min-height: 0; padding: 0; font-size: 13px; }
.lf-login-shell #bottomline { margin: 21px 0 0; color: #526681; font-size: 12px; }
.lf-login-shell #bottomline a { color: var(--lf-blue); }

@media (max-width: 520px) {
  body.lf-login-page { background-position: 52% center; }
  .lf-login-shell { margin-top: 42px; }
  .lf-login-shell #login-form .box-inner { padding: 25px 23px 24px; }
}

/* ===== Variant D (07.11.2026): dark top band, three separate light cards ===== */
body:not(.lf-login-page) { background: #eef2f6; }
body:not(.lf-login-page) #topline,
body:not(.lf-login-page) #topnav { background: #14263d; border-bottom-color: #14263d; }
body:not(.lf-login-page) #taskbar a { color: #c9d6e6; border-radius: 10px; }
body:not(.lf-login-page) #taskbar a:hover,
body:not(.lf-login-page) #taskbar a:focus,
body:not(.lf-login-page) #taskbar a.button-selected { color: #fff; background: #24405f; }
/* Gaps: 6px between cards. */
#mailview-right { margin-left: -4px; }
#mailview-bottom { margin-left: -4px; }
body:not(.lf-login-page) .uibox,
body:not(.lf-login-page) #mailview-top,
body:not(.lf-login-page) #mailview-bottom { border: 1px solid #dde4ec; border-radius: 10px; }
body:not(.lf-login-page) #mailview-top,
body:not(.lf-login-page) #mailview-bottom { overflow: hidden; }
/* Folder card: light. */
body:not(.lf-login-page) #mainscreencontent #mailboxcontainer {
  color: #273447; background: #f9fbfd; border-color: #dde4ec;
}
body:not(.lf-login-page) #mailboxcontainer #folderlist-content { background: #f9fbfd; }
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a { color: #273447; border-radius: 8px; }
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a:hover,
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a:focus { color: #0f4c8f; background: #eaf2fc; }
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox.selected > a {
  color: #0f4c8f; background: #dfeafa; font-weight: 700;
}
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox .unreadcount { color: #fff; background: #1f7ae0; }
body:not(.lf-login-page) #mailboxcontainer .treetoggle { filter: none; opacity: .6; }
body:not(.lf-login-page) #mailboxcontainer .boxfooter { background: #f9fbfd; border-top-color: #dde4ec; }
body:not(.lf-login-page) #mailboxcontainer .boxfooter a { color: #273447; }
body:not(.lf-login-page) #mailboxcontainer .boxfooter a:hover { background: #eaf2fc; }
body:not(.lf-login-page) #mailboxcontainer #mailboxmenulink { color: #273447; background: #eaf2fc; }
body:not(.lf-login-page) #mailboxcontainer #mailboxmenulink .inner { color: #273447; }
/* Accents. */
body:not(.lf-login-page) #messagetoolbar a.button.compose:not(.disabled) { background: #1f7ae0; }
body:not(.lf-login-page) #messagetoolbar a.button.compose:not(.disabled):hover { background: #1668c2; }
body:not(.lf-login-page) .records-table tr.selected td,
body:not(.lf-login-page) .records-table.focus tr.selected td { background: #e3edf8 !important; }
body:not(.lf-login-page) .records-table tbody tr:hover td { background: #f2f6fa; }
/* Compact mode (.minimal): the logo plate must fit the 42px band. */
body.minimal:not(.lf-login-page) #toplogo {
  width: 84px; height: 38px; max-height: 38px; margin-top: 2px; padding: 2px 4px;
}

/* Header: logo centered, nav buttons with icon centered above the label. */
body:not(.lf-login-page) #topnav { position: relative; }
body:not(.lf-login-page) #toplogo {
  position: absolute; left: 50%; top: 0; margin: 4px 0 0 -56px; float: none;
}
body.minimal:not(.lf-login-page) #toplogo { margin: 2px 0 0 -42px; }
body:not(.lf-login-page) #taskbar a {
  display: inline-flex; align-items: center; justify-content: center;
}
body:not(.lf-login-page) #taskbar a span.button-inner {
  flex-direction: column; justify-content: center; gap: 3px;
  width: 100%; text-align: center; font-size: 12px; line-height: 1.1;
}
body:not(.lf-login-page) #taskbar a span.button-inner::before { margin: 0 auto; }
.minimal #taskbar a span.button-inner { font-size: 0; }

/* Compact mode: no stray top line, band 46px, icons centered in 42x38 buttons. */
body.minimal:not(.lf-login-page) #topline { display: none; }
body.minimal:not(.lf-login-page) #header { height: 46px; overflow: hidden; background: #14263d; }
body.minimal:not(.lf-login-page) #topnav { margin-top: 0; top: 0; height: 46px; }
body.minimal:not(.lf-login-page) #taskbar { height: 46px; padding-right: 14px; display: flex; align-items: center; }
body.minimal:not(.lf-login-page) #taskbar a {
  box-sizing: border-box; width: 42px; height: 38px; margin: 0 2px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
body.minimal:not(.lf-login-page) #taskbar a span.button-inner { width: 22px; height: 22px; margin: 0; padding: 0; display: block; }
body.minimal:not(.lf-login-page) #taskbar a span.button-inner::before { display: block; margin: 0; }
body.minimal:not(.lf-login-page) #taskbar .minmodetoggle { width: 19px; }
body.minimal:not(.lf-login-page) #mainscreen { top: 62px; }
body.minimal:not(.lf-login-page) #mainscreen.offset { top: 106px; }

/* Logout icon; compact mode shows icons only. */
#taskbar a.button-logout { --lf-task-icon: url(icons/logout.svg); }
body.minimal:not(.lf-login-page) #taskbar a span.button-inner { font-size: 0; }

/* Preview placeholder follows the real iframe location (see larry-fresh.js). */
body:not(.lf-login-page) #mailview-bottom:has(#messagecontframe[src$="watermark.html"])::before,
body:not(.lf-login-page) #mailview-bottom:has(#messagecontframe[src$="watermark.html"])::after { content: none !important; }
body:not(.lf-login-page) #mailview-bottom.lf-empty::before {
  content: ""; position: absolute; z-index: 2; top: calc(50% - 44px); left: calc(50% - 18px);
  width: 36px; height: 36px; background: #a9bfd0;
  -webkit-mask: url(icons/mail.svg) center / contain no-repeat; mask: url(icons/mail.svg) center / contain no-repeat;
  pointer-events: none;
}
body:not(.lf-login-page) #mailview-bottom.lf-empty::after {
  content: "Выберите письмо для просмотра"; position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  padding: 52px 20px 0; color: #70839a; background: #fff; font-size: 14px; text-align: center;
  pointer-events: none;
}

/* Subfolders of Inbox inherited the Inbox icon through the custom property. */
.folderlist li.mailbox li.mailbox:not(.drafts):not(.sent):not(.archive):not(.junk):not(.trash):not(.inbox) {
  --lf-folder-icon: url(icons/folder.svg);
}

/* Thin divider between the toolbar row and the three cards. */
body:not(.lf-login-page) #mainscreen::before {
  content: ""; position: absolute; left: 0; right: 0; top: 46px; height: 1px; background: #d3dce7; pointer-events: none;
}

/* Divider is 6px thick, centered in the 12px gap. */
body:not(.lf-login-page) #mainscreen::before { top: 43px; height: 6px; }

/* Divider in the header navy, 3px above and below. */
body:not(.lf-login-page) #mainscreen::before { top: 43px; height: 6px; background: #14263d; }

/* Divider: light, rounded, 3px from the button labels above and 3px from the cards below. */
body:not(.lf-login-page) #mainscreen::before { top: 41px; height: 6px; background: #d3dce7; border-radius: 3px; }
body:not(.lf-login-page) #mainscreencontent,
body:not(.lf-login-page) #mainscreen .offset { top: 50px; }
body:not(.lf-login-page) #mainscreen::before { top: 42px; }
body:not(.lf-login-page) #mainscreencontent,
body:not(.lf-login-page) #mainscreen .offset { top: 51px; }

/* Divider: 3px below the lowest toolbar control (search/select bottom at +43px), 3px above the cards. */
body:not(.lf-login-page) #mainscreen::before { top: 46px; }
body:not(.lf-login-page) #mainscreencontent,
body:not(.lf-login-page) #mainscreen .offset { top: 55px; }

/* Divider: 6px above (from the lowest toolbar control) and 6px below (to the cards). */
body:not(.lf-login-page) #mainscreen::before { top: 49px; }
body:not(.lf-login-page) #mainscreencontent,
body:not(.lf-login-page) #mainscreen .offset { top: 61px; }

/* Folder card filled with a soft blue. */
body:not(.lf-login-page) #mainscreencontent #mailboxcontainer { background: #dde9f7; border-color: #c6d8ec; }
body:not(.lf-login-page) #mailboxcontainer #folderlist-content { background: #dde9f7; }
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a:hover,
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a:focus { background: #eaf2fc; color: #0f4c8f; }
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox.selected > a { background: #fff; color: #0f4c8f; box-shadow: 0 1px 2px rgba(20, 38, 61, .08); }
body:not(.lf-login-page) #mailboxcontainer .boxfooter { background: #d2e1f3; border-top-color: #c0d3ea; }
body:not(.lf-login-page) #mailboxcontainer .boxfooter a:hover { background: #c3d8ef; }
body:not(.lf-login-page) #mailboxcontainer #mailboxmenulink { background: #c3d8ef; }

/* Folder rows (hover and selected) have square corners. */
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a,
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox.selected > a { border-radius: 0; }

/* Folder rows: text, icon and counter share one vertical center. */
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a {
  box-sizing: border-box; height: 28px; padding-top: 0; padding-bottom: 0; line-height: 28px;
}
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox > a::before { top: 50%; transform: translateY(-50%); }
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox .unreadcount {
  top: 50%; margin-top: 0; transform: translateY(-50%); line-height: 15px;
}

/* Counter digits: lift 0.5px so the numerals sit exactly in the middle of the pill (height stays 19px). */
body:not(.lf-login-page) #mailboxcontainer #mailboxlist li.mailbox .unreadcount {
  box-sizing: content-box; padding: 2px 4px 3px; line-height: 14px; height: 14px;
}

/* Inter (self-hosted, latin + cyrillic) */
@font-face{font-family:"Inter Fresh";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/inter-latin-400.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter Fresh";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/inter-cyrillic-400.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter Fresh";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/inter-latin-500.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter Fresh";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/inter-cyrillic-500.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter Fresh";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/inter-latin-600.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter Fresh";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/inter-cyrillic-600.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Inter Fresh";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/inter-latin-700.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter Fresh";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/inter-cyrillic-700.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
html, body, body *:not(pre):not(code):not(tt):not(.mono),
input, button, select, textarea {
  font-family: "Inter Fresh", Arial, "Helvetica Neue", Helvetica, sans-serif;
}
body, td, th, input, select, textarea, button { font-size: 12px; }
.unreadcount, #messagelist td.date, #messagelist td.size, .pagenav, .countdisplay { font-variant-numeric: tabular-nums; }

/* Inter is wider than Arial: let toolbar buttons grow to fit their labels. */
body:not(.lf-login-page) #messagetoolbar a.button:not(.compose) {
  box-sizing: border-box; width: auto; min-width: 54px; padding-left: 7px; padding-right: 7px; overflow: visible; text-overflow: clip; white-space: nowrap;
}
body:not(.lf-login-page) #messagetoolbar a.button.compose { min-width: 74px; }
body:not(.lf-login-page) #messagetoolbar a.button.reply-all,
body:not(.lf-login-page) #messagetoolbar a.button.forward { width: auto !important; min-width: 54px; }
body:not(.lf-login-page) #messagetoolbar a.button { max-width: none !important; }
body:not(.lf-login-page) #messagetoolbar a.button.compose { width: auto; padding-left: 10px; padding-right: 10px; }

/* Compact toolbar so it never reaches the filter/search at 1024px: short "Написать" label, tighter padding. */
body:not(.lf-login-page) #messagetoolbar a.button:not(.compose) { padding-left: 4px; padding-right: 4px; min-width: 52px; }
body:not(.lf-login-page) #messagetoolbar a.button.compose { font-size: 0; min-width: 66px; padding-left: 6px; padding-right: 6px; text-align: center; }
body:not(.lf-login-page) #messagetoolbar a.button.compose::after { content: "Написать"; font-size: 10px; }
body:not(.lf-login-page) #messagetoolbar a.button:not(.compose) { padding-left: 2px; padding-right: 2px; }

/* Empty preview: company logo instead of the envelope / Roundcube picture. */
body:not(.lf-login-page) #mailview-bottom.lf-empty::before { content: none; }
body:not(.lf-login-page) #mailview-bottom.lf-empty::after {
  background: #fff url(images/nesk-logo-sharp.webp) center calc(50% - 10px) / 128px auto no-repeat;
  padding: 150px 20px 0;
}
/* The legacy :has([src$=watermark.html]) rule outranks .lf-empty; restore the text with equal specificity, later in the file. */
body:not(.lf-login-page) #mailview-bottom.lf-empty:has(#messagecontframe)::after { content: "Выберите письмо для просмотра" !important; }
body:not(.lf-login-page) #mailview-bottom.lf-empty:has(#messagecontframe)::after {
  background: #fff url(images/nesk-logo-sharp.webp) center calc(50% - 10px) / 128px auto no-repeat;
  padding: 150px 20px 0;
}
/* ===== Videochat (Element) button + overlay, 07.11.26 ===== */
#taskbar a.button-videochat { --lf-task-icon: url(icons/video.svg); cursor: pointer; }
#taskbar a.button-videochat.lf-video-live span.button-inner::after {
  content: ""; display: block; position: absolute; width: 8px; height: 8px;
  margin: -22px 0 0 14px; border-radius: 50%; background: #3ecf6e;
}
#lf-video {
  position: fixed; left: 6px; right: 6px; bottom: 6px; z-index: 5000;
  display: flex; flex-direction: column; background: #fff;
  border-radius: 10px; overflow: hidden; box-shadow: 0 6px 28px rgba(10,25,45,.35);
  visibility: hidden; pointer-events: none;
}
#lf-video.open { visibility: visible; pointer-events: auto; }
#lf-video .lf-video-bar {
  flex: 0 0 34px; display: flex; align-items: center; gap: 14px; padding: 0 12px;
  background: #14263d; color: #dbe6f3; font: 600 12px Inter, Arial, sans-serif;
}
#lf-video .lf-video-bar .lf-video-title { flex: 1; }
#lf-video .lf-video-bar a { color: #9cc4f5; text-decoration: none; cursor: pointer; font-weight: 500; }
#lf-video .lf-video-bar a:hover { color: #fff; }
#lf-video iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* elsbit.ru: свой логотип в пустой панели просмотра (10.11.26) */
html.lf-elsbit body:not(.lf-login-page) #mailview-bottom.lf-empty::after,
html.lf-elsbit body:not(.lf-login-page) #mailview-bottom.lf-empty:has(#messagecontframe)::after {
  background: #fff url(images/logo-elsbit.png) center calc(50% - 10px) / 190px auto no-repeat;
}

/* elsbit.ru: логотип в шапке без белой плашки, крупнее (10.11.26) */
html.lf-elsbit body:not(.lf-login-page) #toplogo {
  left: min(50%, calc(100% - 700px));
  width: clamp(160px, calc(28vw - 105px), 240px); height: auto; max-width: none; max-height: 58px;
  margin: 2px 0 0; padding: 0; transform: translateX(-50%); background: transparent; border-radius: 0;
}

/* Keep the Elsbit header inside the visible viewport when Larry sets a wider min-width. */
html.lf-elsbit body:not(.lf-login-page) #header { width: 100vw; }
html.lf-elsbit body.minimal:not(.lf-login-page) #toplogo { width: 160px; max-height: 42px; }

@media (max-width: 700px) {
  html.lf-elsbit body:not(.lf-login-page) #topline { display: none; }
  html.lf-elsbit body:not(.lf-login-page) #header { height: 46px; overflow: hidden; }
  html.lf-elsbit body:not(.lf-login-page) #topnav { box-sizing: border-box; width: 100%; height: 46px; padding: 0 8px; top: 0; }
  html.lf-elsbit body:not(.lf-login-page) #taskbar { height: 46px; padding-right: 0; display: flex; align-items: center; }
  html.lf-elsbit body:not(.lf-login-page) #taskbar a { box-sizing: border-box; width: 42px; height: 38px; margin: 0 2px; padding: 0; }
  html.lf-elsbit body:not(.lf-login-page) #taskbar a span.button-inner { width: 22px; height: 22px; margin: 0; padding: 0; font-size: 0; }
  html.lf-elsbit body:not(.lf-login-page) #taskbar a span.button-inner::before { width: 22px; height: 22px; margin: 0; }
  html.lf-elsbit body:not(.lf-login-page) #taskbar .minmodetoggle { width: 19px; }
  html.lf-elsbit body:not(.lf-login-page) #toplogo {
    left: 12px; top: 0; width: clamp(80px, calc(100vw - 290px), 160px);
    max-height: 42px; margin: 2px 0 0; transform: none;
  }
  html.lf-elsbit body.minimal:not(.lf-login-page) #toplogo {
    width: clamp(80px, calc(100vw - 290px), 160px);
  }
  html.lf-elsbit body:not(.lf-login-page) #mainscreen { top: 62px; }
  html.lf-elsbit body:not(.lf-login-page) #mainscreen.offset { top: 106px; }
}

/* elsbit.ru: кнопка плагина «Архив» оформлена как остальные кнопки панели (10.11.26).
   Перебивает общий хак /skins/larry/plugins/archive/archive.css (там !important для серой кнопки). */
html.lf-elsbit #messagetoolbar a.button.archive {
  height: 28px !important; padding: 28px 2px 0 !important; margin: 0 !important;
  background: transparent !important; border: 0 !important; border-radius: 0 !important;
}
html.lf-elsbit #messagetoolbar a.button.archive:hover:not(.disabled),
html.lf-elsbit #messagetoolbar a.button.archive:focus:not(.disabled) { background: transparent !important; }
html.lf-elsbit #messagetoolbar a.button.archive span.inner {
  padding: 0 !important; background: none !important; color: inherit !important; font-size: inherit !important; line-height: inherit !important;
}

/* 10.11.26: пункт «О программе» скрыт (версия и список плагинов не нужны пользователям) */
.about-link, a.about-link { display: none !important; }
