/* Marca EkklesiaSoft API Fiscal — baseado no design system (Duralux + ajustes lotesis) */
:root {
    --scsi-primary: #17804b;
}

.nxl-navigation .m-header .lotesis-brand { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 10px; min-height: 64px; width: 100%; }
.lotesis-logo { width: 36px; height: 36px; object-fit: contain; flex: 0 0 auto; }
.nxl-navigation .m-header .lotesis-logo { display: block !important; visibility: visible !important; }
.lotesis-brand-text { display: flex !important; flex: 1 1 auto; min-width: 0; flex-direction: column; line-height: 1.05; color: #14532d !important; visibility: visible !important; }
.lotesis-brand-text strong { font-size: 1.05rem; font-weight: 700; }
.lotesis-brand-text small { margin-top: 4px; color: #64748b !important; font-size: .62rem; white-space: nowrap; }
html.minimenu .nxl-navigation .m-header .lotesis-brand { justify-content: center; gap: 0; }
html.minimenu .nxl-navigation .m-header .lotesis-brand-text { display: none !important; }
.lotesis-user-initials { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--scsi-primary); color: #fff; font-size: .8rem; font-weight: 600; }
.topbar-dropdown { position: relative; }
.nxl-header .topbar-dropdown > .dropdown-menu { display: none !important; position: absolute; right: 0; top: 100%; z-index: 1000; min-width: 210px; opacity: 0; pointer-events: none; visibility: hidden; }
.nxl-header .topbar-dropdown.is-open > .dropdown-menu,
.nxl-header .topbar-dropdown:hover > .dropdown-menu,
.nxl-header .topbar-dropdown:focus-within > .dropdown-menu { display: block !important; opacity: 1; pointer-events: auto; visibility: visible; }

/* Cor primária do projeto (verde, como no lotesis/ui-patterns) */
:root {
    --bs-primary: #17804b;
    --bs-primary-rgb: 23, 128, 75;
}
.bg-primary { background-color: #17804b !important; }
.text-primary { color: #17804b !important; }
.border-primary { border-color: #17804b !important; }
.btn-primary { border-color: #17804b !important; background-color: #17804b !important; }
.btn-primary:hover, .btn-primary:focus { border-color: #12663b !important; background-color: #12663b !important; }
.btn-outline-primary { border-color: #17804b !important; color: #17804b !important; }
.btn-outline-primary:hover, .btn-outline-primary:focus { border-color: #17804b !important; background-color: #17804b !important; color: #fff !important; }
input[type="checkbox"], input[type="radio"] { accent-color: #17804b; }
.form-check-input:checked { border-color: #17804b !important; background-color: #17804b !important; }
.form-control:focus, .form-select:focus { border-color: #17804b !important; box-shadow: 0 0 0 .2rem rgba(23, 128, 75, .12) !important; }

.notification-wrapper { position: relative; }
.notification-toggle { border: 0; background: transparent; position: relative; }
.notification-badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 1px 4px; border-radius: 9px; background: #dc3545; color: #fff; font-size: 10px; line-height: 15px; text-align: center; }
.notification-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 1050; width: 340px; max-height: 430px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, .14); }
.notification-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #eef0f2; }
.notification-list { display: flex; flex-direction: column; }
.notification-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 0; border-bottom: 1px solid #f0f2f4; background: #fff; text-align: left; }
.notification-item:hover, .notification-item.unread { background: #f0f8f4; }
.notification-item span { color: #64748b; font-size: .8rem; }
.notification-empty { padding: 28px 14px; color: #64748b; text-align: center; }
@media (max-width: 575.98px) { .notification-panel { position: fixed; top: 60px; right: 12px; left: 12px; width: auto; max-height: calc(100vh - 80px); } }
.pace .pace-progress { background: #17804b !important; }

/* Controles de marca do header: sobrescreve theme.min.css sem alterar estados informativos. */
.nxl-header .nxl-head-link:hover,
.nxl-header .dark-button:hover,
.nxl-header .light-button:hover,
.nxl-header .notification-toggle:hover,
.nxl-header #profile-dropdown-toggle:hover,
.nxl-header #profile-dropdown-toggle:hover strong,
.nxl-header .lotesis-user-name:hover { color: #12663b !important; }
.nxl-header .nxl-head-link:focus-visible,
.nxl-header .nxl-head-link:active,
.nxl-header .dark-button:focus-visible,
.nxl-header .light-button:focus-visible,
.nxl-header .notification-toggle:focus-visible,
.nxl-header #profile-dropdown-toggle:focus-visible,
.nxl-header #profile-dropdown-toggle:focus-visible strong,
.nxl-header .lotesis-user-name:focus-within { color: #17804b !important; }
.nxl-header .nxl-head-link:focus-visible,
.nxl-header #profile-dropdown-toggle:focus-visible,
.nxl-header .notification-toggle:focus-visible { outline: 2px solid #17804b; outline-offset: 2px; }
.nxl-header .notification-mark-all,
.nxl-header .notification-mark-all:focus-visible,
.nxl-header .notification-item:hover,
.nxl-header .notification-item:focus-visible { color: #17804b !important; }
.nxl-header .notification-mark-all:hover { color: #12663b !important; }
.nxl-header .notification-mark-all:focus-visible,
.nxl-header .notification-item:focus-visible { outline: 2px solid #17804b; outline-offset: -2px; }

/* Overrides kept after Duralux so its blue brand states cannot win in the header. */
.btn-light-brand,
.nxl-link.active,
.nxl-link.active .nxl-micon,
.nxl-link.active .nxl-micon i,
.nxl-link:hover,
.nxl-link:hover .nxl-micon,
.nxl-link:hover .nxl-micon i,
.nxl-head-link:hover,
.nxl-head-link:focus,
.full-screen-switcher .nxl-head-link:hover,
.dark-light-theme .nxl-head-link:hover,
.notification-toggle:hover,
.notification-toggle:focus,
.topbar-dropdown > .nxl-head-link:hover,
.page-header-right button:hover,
.page-header-right button:focus { color: #17804b !important; }
.btn-light-brand { border-color: #17804b !important; background-color: #17804b !important; color: #fff !important; }
.btn-light-brand:hover,
.btn-light-brand:focus { border-color: #12663b !important; background-color: #12663b !important; color: #fff !important; }
.nxl-header .notification-badge { background-color: #17804b; }
.nxl-header .nxl-head-link:focus-visible,
.nxl-header .notification-toggle:focus-visible,
.nxl-header #profile-dropdown-toggle:focus-visible,
.page-header-right button:focus-visible { outline: 2px solid #17804b; outline-offset: 2px; }
.topbar-company { display: flex; flex-direction: column; justify-content: center; min-width: 0; max-width: 250px; margin-right: 8px; color: #334155; line-height: 1.15; }
.topbar-company strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.topbar-company small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #64748b; font-size: .67rem; }
.login-link { color: #b7e6cf; text-decoration: none; }
.login-link:hover, .login-link:focus { color: #fff; text-decoration: underline; }
.painel-login-page { background-color: #05100f; background-image: url('/images/loginfiscal.png'); background-position: center right; background-size: cover; background-repeat: no-repeat; }
.painel-login .form-label { color: #fff !important; }
@media (max-width: 767.98px) { .topbar-company { display: none; } }
