/* Webmail Nobila: barwy panelu (granat i złoto). Tylko nadpisanie wyglądu skórki Elastic — bez zmian w Roundcube. */
body, .form-control, .btn, .popover, .ui-dialog, .ui-widget, input, select, textarea, button {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a, .listing li a.active:hover, .formcontent a { color: #1e3f99; }

/* Lewe menu */
#layout-menu, html.layout-small #layout-menu, html.layout-phone #layout-menu { background: linear-gradient(180deg, #0b1d4d, #0a1128) !important; }
#layout-menu .popover-header { background: transparent !important; }
#layout-menu #logo { max-height: 46px; margin: .6rem auto; }
#taskmenu a { color: #d5dae6 !important; border-radius: 12px; }
#taskmenu a:hover { color: #fff !important; background-color: rgba(255, 255, 255, .08) !important; }
#taskmenu a.selected { color: #f2d27a !important; background: rgba(255, 255, 255, .12) !important; box-shadow: inset 3px 0 0 #e9c46a; }
#taskmenu .special-buttons, #taskmenu .special-buttons a { background: transparent !important; }
#taskmenu a.theme, #taskmenu a.about { display: none !important; }
#taskmenu a.compose { color: #0b132b !important; background: linear-gradient(135deg, #f2d27a, #c9a227) !important; }
#taskmenu a.logout { color: #f4a3a3 !important; }
#taskmenu a.nb-panel-menu { color: #f2d27a !important; font-weight: 800; }
#taskmenu a.nb-panel-menu:before { content: "\2190"; font-family: inherit; font-weight: 900; }

/* Foldery */
#layout-sidebar:not(.sidebar-right) { background: linear-gradient(180deg, #0e2160, #0b1d4d) !important; border-right: 0 !important; }
#layout-sidebar:not(.sidebar-right) > .header { background: transparent !important; color: #fff !important; border-bottom: 1px solid rgba(255, 255, 255, .1) !important; }
#layout-sidebar:not(.sidebar-right) > .header .header-title { color: #fff !important; font-weight: 800; }
#layout-sidebar:not(.sidebar-right) > .header a.button, #layout-sidebar:not(.sidebar-right) > .header .button { color: #e9c46a !important; }
#layout-sidebar:not(.sidebar-right) .footer, #layout-sidebar:not(.sidebar-right) .footer * { color: #9aa6c8 !important; background: transparent !important; border-color: rgba(255, 255, 255, .1) !important; }
#layout-sidebar:not(.sidebar-right) .scroller { background: transparent !important; }
#layout-sidebar:not(.sidebar-right) .listing li, #layout-sidebar:not(.sidebar-right) .listing li a, #layout-sidebar:not(.sidebar-right) .listing li div.treetoggle { color: #d5dae6 !important; background-color: transparent; }
#layout-sidebar:not(.sidebar-right) .listing li > a:hover { background-color: rgba(255, 255, 255, .07) !important; color: #fff !important; }
#layout-sidebar:not(.sidebar-right) .listing li, #layout-sidebar:not(.sidebar-right) .listing li.selected { border: 0 !important; background: transparent !important; }
#layout-sidebar:not(.sidebar-right) .listing li > a { margin: 2px 10px; width: calc(100% - 20px) !important; box-sizing: border-box; border-radius: 10px; }
#layout-sidebar:not(.sidebar-right) .folderlist li.mailbox .unreadcount { right: 12px; }
#layout-sidebar:not(.sidebar-right) .listing li.selected > a, #layout-sidebar:not(.sidebar-right) .listing li.selected > div > a {
    color: #f2d27a !important; background: rgba(233, 196, 106, .16) !important; box-shadow: inset 3px 0 0 #e9c46a; font-weight: 800;
}
#layout-sidebar:not(.sidebar-right) .folderlist li.mailbox .unreadcount { background: #e9c46a !important; color: #0b132b !important; border-radius: 99px; }

/* Prawy panel przy pisaniu wiadomości („Opcje i załączniki”) — jasny, w barwach panelu. */
#layout-sidebar.sidebar-right { background: #f7f9fd !important; border-left: 1px solid #e1e5ee !important; }
#layout-sidebar.sidebar-right > .header { background: #fff !important; border-bottom: 1px solid #e1e5ee !important; }
#layout-sidebar.sidebar-right > .header .header-title { color: #0b132b !important; font-weight: 800; }
#layout-sidebar.sidebar-right .col-form-label { color: #2a3350 !important; font-weight: 600; }
#layout-sidebar.sidebar-right .upload-form { margin: 14px 12px 6px; }
#layout-sidebar.sidebar-right .upload-form .hint { color: #6b7390; }
#layout-sidebar.sidebar-right .btn.attach {
    background: #0b1d4d !important; border-color: #0b1d4d !important; color: #fff !important; border-radius: 12px; font-weight: 700;
}
#layout-sidebar.sidebar-right .btn.attach:hover { background: #1e3f99 !important; }
#layout-sidebar.sidebar-right .file-upload, #layout-sidebar.sidebar-right #compose-attachments.droptarget {
    border-color: #cdd3e1 !important; border-radius: 16px; background: #fff;
}
#layout-sidebar.sidebar-right .droptarget.hover, #layout-sidebar.sidebar-right .droptarget.active { border-color: #c9a227 !important; background: #fff8e6 !important; }
#layout-sidebar.sidebar-right .formcontent { padding: 6px 14px; }

/* Przycisk powrotu do panelu: ciemna karta, złota obwódka i złote kółko ze strzałką. */
a.nb-panel {
    display: flex; align-items: center; gap: 12px; margin: 14px 12px 6px; padding: 10px 12px; border-radius: 14px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(233, 196, 106, .45); color: #fff !important;
    text-decoration: none !important; transition: background .15s, border-color .15s;
}
a.nb-panel:hover, a.nb-panel:focus { background: rgba(233, 196, 106, .14); border-color: #e9c46a; outline: none; }
a.nb-panel .nb-k {
    width: 34px; height: 34px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #f2d27a, #c9a227);
    color: #0b132b; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px;
}
a.nb-panel b { display: block; font-size: 14.5px; font-weight: 800; line-height: 1.2; color: #fff; }
a.nb-panel small { display: block; font-size: 11.5px; color: #9aa6c8; margin-top: 1px; }

/* Lista wiadomości */
#messagelist tr.unread > td:first-child { box-shadow: inset 4px 0 0 #c9a227; }
#messagelist tr.unread td span.subject, #messagelist tr.unread .subject a { font-weight: 800; }
#messagelist tr.selected td, .listing li.selected, table.records-table tr.selected td { background-color: #fff8e6 !important; color: #0b132b !important; }
#messagelist tr.focused > td:first-child { box-shadow: inset 4px 0 0 #1e3f99; }
.listing .unreadcount, #messagelist .msgicon.status.unread:before, #messagelist span.flag.unread:before { color: #c9a227; }

/* Wspólne skrzynki: znaczek serwisu na liście i pasek w otwartej wiadomości */
.nb-chip { display: inline-flex; align-items: center; gap: 4px; margin-right: 7px; padding: 1px 8px 1px 4px; border-radius: 99px; font-size: 11px; font-weight: 800; line-height: 1.6; vertical-align: 1px; white-space: nowrap; }
.nb-chip img { width: 14px; height: 14px; }
.nb-serwis { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 9px 12px; border: 1px solid; border-radius: 12px; font-size: 13px; }
.nb-serwis img { width: 22px; height: 22px; flex: none; }
.nb-serwis b { color: #0b132b; }

/* Przyciski i pola */
.btn-primary, .btn-primary:not(:disabled):not(.disabled):active, .btn.btn-primary.submit, .ui-dialog .ui-dialog-buttonpane .btn-primary {
    background-color: #0b1d4d !important; border-color: #0b1d4d !important; color: #fff !important; border-radius: 12px;
}
.btn-primary:hover, .btn-primary:focus { background-color: #1e3f99 !important; border-color: #1e3f99 !important; }
.btn-secondary { border-radius: 12px; }
.form-control:focus, .custom-select:focus { border-color: #c9a227 !important; box-shadow: 0 0 0 .2rem rgba(233, 196, 106, .35) !important; }
.custom-control-input:checked ~ .custom-control-label:before, .custom-switch .custom-control-input:checked ~ .custom-control-label:before { background-color: #0b1d4d !important; border-color: #0b1d4d !important; }
.toolbar a.button:hover, .toolbar a.button:focus { color: #1e3f99; }
.header .header-title { font-weight: 800; color: #0b132b; }

/* Logowanie (poczta.nobila.pl) */
body.task-login, body.task-login #layout, body.task-login #layout-content {
    background: radial-gradient(1200px 600px at 20% 0%, #1e3f99 0%, #0b1d4d 45%, #0a1128 100%) !important; border: 0 !important;
}
body.task-login #layout-content > #logo { top: 7vh; max-height: 72px; }
body.task-login #login-form {
    top: 10vh; max-width: 440px; background: #fff; border-radius: 24px; padding: 30px 34px 24px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .45); border-top: 6px solid #e2be4f;
}
body.task-login .nb-login-tytul { margin: 0 0 4px; font-size: 26px; font-weight: 900; color: #0b132b; }
body.task-login .nb-login-podtytul { margin: 0 0 20px; color: #6b7390; font-size: 14px; }
body.task-login .input-group-text { background: #f5f6f9; border-color: #cdd3e1; color: #1e3f99; border-radius: 12px 0 0 12px; }
body.task-login .input-group .form-control { border-color: #cdd3e1; border-radius: 0 12px 12px 0; }
#rcmloginsubmit {
    background: linear-gradient(135deg, #f2d27a, #c9a227) !important; color: #0b132b !important; border: 0 !important;
    border-radius: 14px !important; font-weight: 800 !important; text-transform: none !important; letter-spacing: 0;
}
#rcmloginsubmit:hover { filter: brightness(1.05); }
body.task-login #login-footer { color: #9aa6c8; }
body.task-login #login-footer .nb-login-wskazowka { margin-top: 16px; font-size: 12.5px; color: #6b7390; text-align: center; }
body.task-login #login-footer .nb-login-wskazowka b { color: #1e3f99; }
body.task-login #layout-content #login-footer > div { background: transparent; }

/* Przejście panel ↔ poczta (to samo w panelu Nobila i w webmailu). */
.nb-przejscie { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(900px 500px at 50% 30%, rgba(30, 63, 153, .97), rgba(10, 17, 40, .98)); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; animation: nb-wejscie .35s ease-out both; }
.nb-przejscie * { box-sizing: border-box; }
.nb-karta { display: flex; flex-direction: column; align-items: center; gap: 26px; animation: nb-unies .5s .1s cubic-bezier(.2, .8, .2, 1) both; }
.nb-trasa { display: flex; align-items: center; }
.nb-st { width: 210px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; border-radius: 22px; background: rgba(255, 255, 255, .07); border: 1.5px solid rgba(255, 255, 255, .14); color: #fff; text-align: center; }
.nb-st b { font-size: 18px; font-weight: 900; }
.nb-st small { font-size: 13px; color: #b9c4e4; overflow-wrap: anywhere; }
.nb-ik { width: 58px; height: 58px; border-radius: 18px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.nb-ik.nb-n { background: #0b1d4d; border: 1.5px solid #e9c46a; }
.nb-ik.nb-z { background: linear-gradient(135deg, #f2d27a, #c9a227); }
.nb-tor { position: relative; width: 190px; height: 6px; margin: 0 6px; border-radius: 9px; background: rgba(255, 255, 255, .12); }
.nb-pas { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 9px; background: linear-gradient(90deg, #e9c46a, #f2d27a); animation: nb-pas 1.1s .25s cubic-bezier(.6, 0, .3, 1) both; }
.nb-powrot .nb-pas { left: auto; right: 0; }
.nb-kul { position: absolute; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; background: #f2d27a; color: #0b132b; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; box-shadow: 0 0 22px rgba(242, 210, 122, .8); animation: nb-kul-tam 1.1s .25s cubic-bezier(.6, 0, .3, 1) both; }
.nb-powrot .nb-kul { animation-name: nb-kul-powrot; }
.nb-tam .nb-poc, .nb-powrot .nb-pan { animation: nb-cel 1.3s .2s ease-in-out both; }
.nb-tam .nb-pan, .nb-powrot .nb-poc { animation: nb-zrodlo 1.3s .2s ease-in-out both; }
.nb-nap { text-align: center; color: #fff; }
.nb-nap b { display: block; font-size: 26px; font-weight: 900; }
.nb-nap > span { display: block; margin-top: 6px; color: #c9d6f5; font-size: 14px; }
.nb-kropki { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.nb-kropki i { width: 7px; height: 7px; border-radius: 50%; background: #e9c46a; animation: nb-kropka 1s infinite ease-in-out; }
.nb-kropki i:nth-child(2) { animation-delay: .15s; }
.nb-kropki i:nth-child(3) { animation-delay: .3s; }
/* Przyjazd: końcowy stan trasy przez chwilę, potem łagodne zniknięcie. */
.nb-przejscie.nb-przyjazd { animation: nb-wyjscie .5s .35s ease-in both; pointer-events: none; }
.nb-przyjazd .nb-karta, .nb-przyjazd .nb-pas, .nb-przyjazd .nb-kul, .nb-przyjazd .nb-st { animation-delay: -5s !important; animation-duration: .01s !important; }
.nb-przyjazd .nb-kropki { display: none; }
@keyframes nb-wejscie { from { opacity: 0; } to { opacity: 1; } }
@keyframes nb-wyjscie { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
@keyframes nb-unies { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes nb-pas { from { width: 0; } to { width: 100%; } }
@keyframes nb-kul-tam { from { left: -17px; } to { left: calc(100% - 17px); } }
@keyframes nb-kul-powrot { from { left: calc(100% - 17px); } to { left: -17px; } }
@keyframes nb-cel { 0%, 55% { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); transform: none; } 80% { transform: scale(1.06); } 100% { background: rgba(233, 196, 106, .16); border-color: #e9c46a; transform: scale(1.03); box-shadow: 0 0 0 6px rgba(233, 196, 106, .12); } }
@keyframes nb-zrodlo { from { opacity: 1; } to { opacity: .55; } }
@keyframes nb-kropka { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
@media (max-width: 640px) {
    .nb-st { width: 128px; padding: 16px 8px; }
    .nb-st small { font-size: 11.5px; }
    .nb-tor { width: 56px; }
    .nb-nap b { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    .nb-przejscie, .nb-przejscie * { animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}
