/* Hide LMS menu icons */
i.lms-ui-icon-documentation,
i.lms-ui-icon-help,
i.lms-ui-icon-helpdesk,
i.lms-ui-icon-logout,
i.lms-ui-icon-money,
i.lms-userpanel-notices {
    display: none !important;
}
/* Fix LOGIN button - red with white text */
.loginBox button,
.loginBox input[type="submit"] {
    background-color: #e20019 !important;
    color: #fff !important;
}

/* Force hide all LMS icon pseudo-elements in headerMenu */
.headerMenu .menu_link i {
    display: none !important;
    font-size: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.headerMenu .menu_link i::before {
    display: none !important;
    content: none !important;
}

/* Fix session panel - white text on red background */
.userPanel,
.userPanel *,
.userPanel a,
.userPanel span,
.userPanel div,
.userPanel__user,
.userPanel__time {
    color: #fff !important;
}

/* Force Lato font everywhere in userpanel */
body, body *,
table, td, th, tr,
input, select, textarea, button,
.SMALL, .PROMPT, .bold,
div, span, p, a, li, ul, ol,
h1, h2, h3, h4, h5, h6,
label, legend, fieldset {
    font-family: "Lato", sans-serif !important;
}

/* Fix links and content inside main panel area */
.mainContainer a {
    color: var(--brand) !important;
    text-decoration: none !important;
}
.mainContainer a:hover {
    color: var(--brand-dark) !important;
    text-decoration: underline !important;
}
.mainContainer table {
    width: 100% !important;
    border-collapse: collapse !important;
}
.mainContainer td, .mainContainer th {
    padding: 8px 12px !important;
    border-bottom: 1px solid var(--border-color) !important;
    vertical-align: middle !important;
}
.mainContainer th {
    font-weight: 700 !important;
    text-align: left !important;
}

/* Fix bank account fields alignment */
.mainContainer .lms-ui-multi-value-field,
.mainContainer .bankaccount,
.mainContainer input[name*="bankaccount"],
.mainContainer .lms-ui-bankaccount,
.mainContainer td .bankaccount,
.mainContainer .box-content td {
    font-size: 14px !important;
    padding: 8px 12px !important;
    line-height: 1.5 !important;
}
.mainContainer .box-content table td,
.mainContainer .box-content table th {
    padding: 8px 12px !important;
    vertical-align: middle !important;
    font-size: 14px !important;
    white-space: nowrap !important;
}
.mainContainer .box-content table {
    width: 100% !important;
}

/* Fix notices/messages content styling */
.mainContainer .box-content,
.mainContainer .box-content * {
    font-family: "Lato", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}
.mainContainer .box-content h1,
.mainContainer .box-content h2,
.mainContainer .box-content h3,
.mainContainer .box-content h4 {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}
.mainContainer .box-content table.SMALL,
.mainContainer table.SMALL {
    width: 100% !important;
    border-collapse: collapse !important;
}
.mainContainer table.SMALL td {
    padding: 8px 12px !important;
    vertical-align: top !important;
    border-bottom: 1px solid var(--border-color) !important;
    word-wrap: break-word !important;
    white-space: normal !important;
}
.mainContainer table.SMALL td:first-child {
    font-weight: 700 !important;
    width: 120px !important;
    white-space: nowrap !important;
}
.mainContainer .box-content a {
    color: var(--brand) !important;
    text-decoration: underline !important;
}
.mainContainer .box-content a:hover {
    color: var(--brand2) !important;
}
/* Notice message body */
.mainContainer td[colspan] {
    padding: 15px !important;
    line-height: 1.8 !important;
}

/* Fix info panel - bank accounts, PIN, update links */
.mainContainer .lms-ui-tab-table-stripe td,
.mainContainer .lms-ui-tab-table-stripe th,
.mainContainer table.lms-ui td,
.mainContainer .module-info td {
    padding: 10px 15px !important;
    vertical-align: middle !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    border-bottom: 1px solid #eee !important;
}
/* Bank account row */
.mainContainer td[colspan] a,
.mainContainer .bankaccount {
    font-size: 14px !important;
    color: var(--brand) !important;
}
/* Fix action links (Zmień PIN, Aktualizuj dane) */
.mainContainer a[href*="pin"],
.mainContainer a[href*="update"],
.mainContainer a[href*="zmien"],
.mainContainer a[href*="aktualizuj"] {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 0 !important;
    font-size: 14px !important;
    color: var(--brand) !important;
    text-decoration: none !important;
}
.mainContainer a[href*="pin"]:hover,
.mainContainer a[href*="update"]:hover,
.mainContainer a[href*="zmien"]:hover,
.mainContainer a[href*="aktualizuj"]:hover {
    color: var(--brand2) !important;
}

/* Fix widgetElements info box */
.widgetElements {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.widgetElements li {
    padding: 12px 15px !important;
    border-bottom: 1px solid #eee !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}
.widgetElements li:last-child {
    border-bottom: none !important;
}
.widgetElements > li > p {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin: 0 !important;
}
.widgetElements > li > p > .label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #666 !important;
    min-width: 140px !important;
    flex-shrink: 0 !important;
}
.widgetElements > li > p > .value {
    text-align: right !important;
    font-weight: 600 !important;
}
.widgetElements > li > p > .label img {
    width: 16px !important;
    height: 16px !important;
}
/* Bank accounts fix - outside li, target p directly */
.widgetElements > p {
    padding: 12px 15px !important;
    border-bottom: 1px solid #eee !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin: 0 !important;
    font-size: 14px !important;
}
.widgetElements > p .label {
    color: #666 !important;
    min-width: 140px !important;
    flex-shrink: 0 !important;
}
.widgetElements > p .value {
    text-align: right !important;
    font-weight: 600 !important;
}
/* Fix PIN/Update links */
.widgetElements li a[href*="info"] {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    color: var(--brand) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}
.widgetElements li a[href*="info"] img {
    width: 16px !important;
    height: 16px !important;
}
.widgetElements li a[href*="info"]:hover {
    color: var(--brand2) !important;
}
/* Notice body - clean styling */
.bg-light.p-15 {
    background: #f8f9fa !important;
    padding: 20px !important;
    border-radius: 10px !important;
    margin-top: 10px !important;
    line-height: 1.8 !important;
    font-size: 14px !important;
}
.bg-light.p-15 p {
    margin: 0 0 12px 0 !important;
}
.bg-light.p-15 a {
    color: var(--brand) !important;
}
.bg-light.p-15 a[href*="confirm"] {
    display: inline-block !important;
    padding: 8px 16px !important;
    background: var(--brand) !important;
    color: #fff !important;
    border-radius: 8px !important;
    margin-top: 10px !important;
    text-decoration: none !important;
}

/* Reset notice body - undo flex from widgetElements */
.bg-light.p-15 p,
.notice-body p {
    display: block !important;
}
.bg-light.p-15 strong,
.notice-body strong {
    display: inline !important;
}

/* Dark mode fixes for userpanel */
[data-theme=dark] .widgetItem,
[data-theme=dark] .widgetItem__content,
[data-theme=dark] .widgetSite__column,
[data-theme=dark] .box-content,
[data-theme=dark] .widgetElements {
    background-color: var(--bg-color) !important;
    color: var(--font-color) !important;
}
[data-theme=dark] .widgetElements li {
    border-bottom-color: var(--border-color) !important;
}
[data-theme=dark] .widgetItem__header,
[data-theme=dark] .widgetItem__title {
    background-color: var(--brand) !important;
    color: var(--white) !important;
}
[data-theme=dark] .widgetElements > li > p > .label {
    color: #999 !important;
}
[data-theme=dark] .widgetElements > li > p > .value {
    color: var(--font-color) !important;
}
[data-theme=dark] a {
    color: #8899cc !important;
}
[data-theme=dark] a:hover {
    color: #aabbee !important;
}
[data-theme=dark] .bg-light.p-15 {
    background: #1a264d !important;
    color: var(--font-color) !important;
}
[data-theme=dark] .mainFooter,
[data-theme=dark] .mainFooter__bottom {
    background-color: var(--brand-dark) !important;
    color: #999 !important;
}
[data-theme=dark] .mainFooter a {
    color: #999 !important;
}
[data-theme=dark] input,
[data-theme=dark] select,
[data-theme=dark] textarea {
    background-color: #1a264d !important;
    color: var(--font-color) !important;
    border-color: var(--border-color) !important;
}
[data-theme=dark] .loginBox,
[data-theme=dark] .loginPanel {
    background-color: var(--bg-color) !important;
    color: var(--font-color) !important;
}
[data-theme=dark] .loginBox__header {
    background-color: var(--brand) !important;
}
/* Dark mode - LMS specific tables */
[data-theme=dark] table,
[data-theme=dark] td,
[data-theme=dark] th,
[data-theme=dark] tr {
    background-color: transparent !important;
    color: var(--font-color) !important;
}
[data-theme=dark] .dark,
[data-theme=dark] .light,
[data-theme=dark] .lucid,
[data-theme=dark] .darkest {
    background-color: transparent !important;
    color: var(--font-color) !important;
}
[data-theme=dark] .userPanel {
    background: var(--brand2) !important;
    color: #fff !important;
}

/* Dark mode - fix content boxes */
[data-theme=dark] .widgetItem__content {
    background-color: #10172e !important;
    border-color: #1a264d !important;
}
[data-theme=dark] .widgetElements li,
[data-theme=dark] .widgetElements > p {
    border-bottom-color: #1a264d !important;
    color: #fcfcfc !important;
}
[data-theme=dark] .widgetElements > li > p > .label {
    color: #888 !important;
}
[data-theme=dark] .widgetElements .value,
[data-theme=dark] .widgetElements strong {
    color: #fcfcfc !important;
}
/* Dark mode - computer list items */
[data-theme=dark] .dark,
[data-theme=dark] .light,
[data-theme=dark] .lucid,
[data-theme=dark] .blend,
[data-theme=dark] .green {
    background-color: #1a264d !important;
    color: #fcfcfc !important;
}
[data-theme=dark] .dark h5,
[data-theme=dark] .light h5 {
    color: #fcfcfc !important;
}
/* Dark mode - links */
[data-theme=dark] .widgetElements a,
[data-theme=dark] .mainContainer a {
    color: #6688cc !important;
}
[data-theme=dark] .mainContainer a:hover {
    color: #88aaee !important;
}
/* Dark mode - login box */
[data-theme=dark] .loginPanel__form {
    background-color: #10172e !important;
    border-color: #1a264d !important;
}
[data-theme=dark] .loginPanel__form input {
    background-color: #1a264d !important;
    color: #fcfcfc !important;
    border-color: #26335e !important;
}

/* Dark mode - white links and text */
[data-theme=dark] .headerMenu a,
[data-theme=dark] .headerMenu .menu_link,
[data-theme=dark] .widgetElements a,
[data-theme=dark] .mainContainer a,
[data-theme=dark] .mainFooter a,
[data-theme=dark] .topMenu a,
[data-theme=dark] .contactsList a {
    color: #fcfcfc !important;
}
[data-theme=dark] .headerMenu a:hover,
[data-theme=dark] .widgetElements a:hover,
[data-theme=dark] .mainContainer a:hover {
    color: #ddd !important;
}
[data-theme=dark] .bg-light.p-15 a {
    color: #88aaee !important;
}

/* Dark mode - ALL text white */
[data-theme=dark] body,
[data-theme=dark] body *,
[data-theme=dark] h1, [data-theme=dark] h2, [data-theme=dark] h3,
[data-theme=dark] h4, [data-theme=dark] h5, [data-theme=dark] h6,
[data-theme=dark] p, [data-theme=dark] span, [data-theme=dark] div,
[data-theme=dark] li, [data-theme=dark] td, [data-theme=dark] th,
[data-theme=dark] label, [data-theme=dark] strong, [data-theme=dark] b,
[data-theme=dark] .widgetItem__header,
[data-theme=dark] .widgetItem__title,
[data-theme=dark] .SMALL, [data-theme=dark] .bold {
    color: #fcfcfc !important;
}
[data-theme=dark] .widgetElements > li > p > .label {
    color: #aaa !important;
}

/* Dark mode - fix white areas */
[data-theme=dark] body,
[data-theme=dark] html {
    background-color: #10172e !important;
}
[data-theme=dark] .mainBody,
[data-theme=dark] .mainContainer,
[data-theme=dark] .container,
[data-theme=dark] main,
[data-theme=dark] footer,
[data-theme=dark] .mainFooter,
[data-theme=dark] .mainFooter__bottom,
[data-theme=dark] .mainFooter__info,
[data-theme=dark] .mainFooter__author {
    background-color: #10172e !important;
}
[data-theme=dark] .bg-light,
[data-theme=dark] .bg-light.p-15,
[data-theme=dark] .p-15 {
    background-color: #1a264d !important;
    color: #fcfcfc !important;
}

/* Dark mode - fix labels and links too dark */
[data-theme=dark] .widgetElements > li > p > .label,
[data-theme=dark] .widgetElements .label,
[data-theme=dark] .widgetElements > p > .label {
    color: #ccc !important;
}
[data-theme=dark] .widgetElements > li > p > .value,
[data-theme=dark] .widgetElements .value,
[data-theme=dark] .widgetElements > p > .value {
    color: #fff !important;
}
[data-theme=dark] .widgetElements a {
    color: #99bbff !important;
}
[data-theme=dark] .widgetElements a:hover {
    color: #fff !important;
}
[data-theme=dark] .widgetElements li {
    color: #fcfcfc !important;
}

/* Dark mode - fix address icon and action links */
[data-theme=dark] .widgetElements .label img,
[data-theme=dark] .widgetElements img {
    filter: invert(1) !important;
}
[data-theme=dark] .widgetElements a[href*="info"],
[data-theme=dark] .widgetElements a[href*="update"],
[data-theme=dark] .widgetElements a[href*="pin"] {
    color: #99bbff !important;
    opacity: 1 !important;
}
