/* Shared presentation layer over AdminLTE 2; no changes to application behavior. */
@media screen {
  body {
    --ui-primary: #2563eb;
    --ui-ink: #172b4d;
    --ui-muted: #64748b;
    --ui-line: #e2e8f0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ui-ink);
    background: #f4f7fb;
    line-height: 1.5;
  }

  .content-wrapper, .right-side { background: #f4f7fb; }
  .content { padding: 24px; }
  .content-header { padding: 24px 24px 0; }
  .content-header > h1 { font-size: 26px; font-weight: 700; letter-spacing: -.6px; }
  .content-header > h1 > small, .text-muted { color: var(--ui-muted); }

  .main-header .navbar { background: #fff !important; border-bottom: 1px solid var(--ui-line); }
  .main-header .navbar .nav > li > a,
  .main-header .navbar .sidebar-toggle { color: var(--ui-ink) !important; }
  .main-header .navbar .nav > li > a:hover,
  .main-header .navbar .sidebar-toggle:hover { background: #eff6ff !important; }
  .main-header .logo { background: #14243c !important; color: #fff !important; font-weight: 700; }
  .main-sidebar, .left-side { background: #14243c !important; }
  .sidebar-menu > li.header { background: transparent !important; color: #9bacc4 !important; letter-spacing: 1px; }
  .sidebar-menu > li > a { margin: 3px 8px; border-radius: 8px; color: #cbd5e1 !important; }
  .sidebar-menu > li:hover > a,
  .sidebar-menu > li.active > a { background: #243d60 !important; color: #fff !important; border-left-color: #60a5fa !important; }
  .sidebar-menu > li > .treeview-menu { background: #102037 !important; }
  .treeview-menu > li > a { color: #b6c5da !important; padding-top: 9px; padding-bottom: 9px; }
  .treeview-menu > li.active > a, .treeview-menu > li > a:hover { color: #fff !important; }
  .user-panel > .info, .user-panel > .info > a { color: #e2e8f0 !important; }
  .sidebar-mini.sidebar-collapse .sidebar-menu > li > a { margin-left: 0; margin-right: 0; }

  .box { border-radius: 12px; box-shadow: 0 3px 16px rgba(23,43,77,.06); border-top-width: 3px; }
  .box-header { padding: 18px 20px; }
  .box-header.with-border { border-bottom-color: var(--ui-line); }
  .box-title { font-weight: 600; }
  .box-body { padding: 20px; }
  .box-footer { padding: 16px 20px; border-top-color: var(--ui-line); border-radius: 0 0 12px 12px; }
  .box.box-primary { border-top-color: var(--ui-primary); }
  .small-box, .info-box { border-radius: 12px; box-shadow: 0 3px 16px rgba(23,43,77,.07); }
  .info-box-icon { border-radius: 12px 0 0 12px; }
  .small-box > .small-box-footer { border-radius: 0 0 12px 12px; }

  label { font-weight: 600; }
  .form-control { border: 1px solid #cbd5e1; border-radius: 7px; box-shadow: none; min-height: 36px; }
  .form-control:focus { border-color: var(--ui-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
  .input-group .form-control { border-radius: 0; }
  .input-group-addon { border-color: #cbd5e1; background: #f8fafc; }
  .select2-container--default .select2-selection--single { border-radius: 7px; border-color: #cbd5e1; min-height: 36px; }
  .btn { border-radius: 7px; font-weight: 600; transition: background-color .15s, box-shadow .15s; }
  .btn-primary { background: var(--ui-primary); border-color: var(--ui-primary); }
  .btn-primary:hover, .btn-primary:focus { background: #1d4ed8; border-color: #1d4ed8; }
  .btn-default { background: #fff; border-color: #cbd5e1; color: #334155; }
  a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid #60a5fa; outline-offset: 3px;
  }

  .table > thead > tr > th { background: #f8fafc; color: #475569; font-size: 12px; border-bottom: 1px solid var(--ui-line); }
  .table > tbody > tr > td, .table > thead > tr > th { padding: 12px; vertical-align: middle; }
  .table > tbody > tr > td { border-top-color: #edf2f7; }
  .table-hover > tbody > tr:hover { background: #eff6ff; }
  .pagination > li > a, .pagination > li > span { border-color: var(--ui-line); color: var(--ui-primary); }
  .pagination > .active > a, .pagination > .active > span { background: var(--ui-primary); border-color: var(--ui-primary); color: #fff; }
  .modal-content { border-radius: 12px; border: 0; box-shadow: 0 20px 60px rgba(15,23,42,.2); }
  .modal-header, .modal-footer { border-color: var(--ui-line); padding: 20px; }
  .modal-body { padding: 20px; }
  .alert { border-radius: 8px; }
  .main-footer { background: #fff; border-top-color: var(--ui-line); color: var(--ui-muted); padding: 18px 24px; }

  @media (max-width: 767px) {
    .content { padding: 14px; }
    .content-header { padding: 18px 14px 0; }
    .content-header > h1 { font-size: 22px; }
    .box-body, .box-header, .box-footer { padding: 14px; }
    .table-responsive { border-color: var(--ui-line); border-radius: 8px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
  }
}

/* UPV solar identity. Screen-only rules keep business documents printable. */
@media screen {
  body { --ui-primary: #154773; --ui-ink: #172a3b; --ui-muted: #727a81; --ui-line: #e3e6e9; background: #f0f3f6; }
  .content-wrapper, .right-side { background: #f0f3f6; }
  .main-header .logo { background: #12283c !important; height: 64px; line-height: 64px; }
  .upv-wordmark { text-align: left; font-size: 29px; letter-spacing: -1px; }
  .upv-wordmark > i { color: #6caee7; margin-right: 7px; }
  .upv-wordmark > small { display: inline-block; font-size: 8px; letter-spacing: 1.2px; line-height: 1.5; width: 55px; margin-left: 8px; }
  .main-header .navbar { min-height: 64px; background: #fbfdfe !important; }
  .main-header .sidebar-toggle { padding: 22px 20px; }
  .main-header .navbar .nav > li > a { padding-top: 22px; padding-bottom: 22px; }
  .main-sidebar { padding-top: 64px; background: #12283c !important; }
  .upv-sidebar-intro { padding: 27px 21px 23px; border-bottom: 1px solid #ffffff12; margin-bottom: 14px; }
  .upv-sidebar-intro > span { display: block; font-size: 9px; color: #9baab8; letter-spacing: 1.8px; margin-bottom: 8px; }
  .upv-sidebar-intro > strong { color: #e9eff4; font-size: 13px; font-weight: 500; }
  .sidebar-menu > li > a { padding-top: 13px; padding-bottom: 13px; color: #c0c9d1 !important; border-left: 0 !important; margin: 4px 12px; }
  .sidebar-menu > li > a > .fa { margin-right: 7px; }
  .sidebar-menu > li.active > a { background: #75b2e8 !important; color: #172a3b !important; font-weight: 600; }
  .sidebar-menu > li:hover > a { background: #243d52 !important; }
  .sidebar-menu > li.active:hover > a { background: #75b2e8 !important; }
  .sidebar-menu > li > .treeview-menu { background: #102537 !important; padding: 8px 0; }
  .sidebar-menu > li.header { color: #9baab8 !important; font-size: 10px; }
  .sidebar-form { border: 1px solid #546573 !important; border-radius: 8px !important; margin: 12px !important; }
  .sidebar-form input, .sidebar-form .btn { background: #21374b !important; color: #e4e8ec !important; }
  .upv-workspace-label { float: left; padding: 22px 0; font-size: 12px; color: #7c8288; }
  .upv-workspace-label strong { color: #233748; font-weight: 600; }
  .upv-status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4678a3; margin-right: 8px; }
  .upv-workspace-divider { margin: 0 14px; color: #c9cdd1; }
  .box { border: 1px solid var(--ui-line); box-shadow: 0 4px 20px #20303e05; border-radius: 14px; }
  .box.box-primary, .box.box-danger, .box.box-success { border-top-color: var(--ui-line); }
  .box-title { font-size: 16px; }
  .btn-primary { background: #154773; border-color: #154773; }
  .btn-primary:hover, .btn-primary:focus { background: #103555; border-color: #103555; }
  .table > thead > tr > th { background: #f1f4f7; color: #636c74; }
  .table-hover > tbody > tr:hover { background: #edf2f7; }
  .main-footer { background: #fbfdfe; font-size: 11px; }
  .upv-footer strong { color: #233748; letter-spacing: 1px; }
  .upv-footer strong span { margin-left: 8px; font-weight: 400; letter-spacing: 0; }
  .upv-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 4px 0 26px; }
  .upv-eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 600; }
  .upv-page-heading .upv-eyebrow { color: #798086; }
  .upv-page-heading h1 { margin: 8px 0; font-size: 30px; font-weight: 650; letter-spacing: -1px; }
  .upv-page-heading p { color: #7b8187; margin: 0; }
  .upv-heading-tag { background: #e3eaf0; color: #455563; border: 1px solid #d4dde5; border-radius: 24px; padding: 9px 14px; font-size: 11px; white-space: nowrap; }
  .upv-heading-tag i { color: #1b64a3; margin-right: 6px; }
  .upv-welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: #172c3f; color: #e9eff5; border-radius: 18px; padding: 32px 38px; margin-bottom: 26px; overflow: hidden; }
  .upv-welcome .upv-eyebrow { color: #89b4d9; }
  .upv-welcome h2 { font-size: 29px; line-height: 1.25; letter-spacing: -.6px; margin: 14px 0; }
  .upv-welcome p { color: #b4bfc8; font-size: 12px; margin-bottom: 0; }
  .upv-solar-art { position: relative; width: 280px; height: 180px; flex-shrink: 0; }
  .upv-sun { position: absolute; top: 0; right: 28px; width: 90px; height: 90px; border-radius: 50%; background: #7bb6e9; box-shadow: 0 0 0 18px #6daee710, 0 0 0 36px #6daee708; }
  .upv-panel { position: absolute; width: 175px; height: 108px; left: 12px; bottom: 3px; border: 3px solid #b4c0cb; border-radius: 4px; background: repeating-linear-gradient(90deg, transparent 0, transparent 31px, #90a6ba44 32px, #90a6ba44 33px), repeating-linear-gradient(0deg, #254d4f 0, #254d4f 31px, #90a6ba 32px, #90a6ba 33px); transform: skewY(-12deg); box-shadow: 8px 12px 0 #0a1b2a99; }
  .upv-panel-back { left: 100px; bottom: 45px; width: 140px; height: 90px; opacity: .65; }
  .upv-dashboard > .row { display: flex; flex-wrap: wrap; }
  .upv-dashboard > .row > div { flex: 1; min-width: 160px; }
  .upv-dashboard .small-box { background: #fbfdfe !important; color: #243543 !important; border: 1px solid #dde3e8; box-shadow: none; border-radius: 12px; }
  .upv-dashboard .small-box .inner { padding: 22px; }
  .upv-dashboard .small-box h1 { font-size: 31px; font-weight: 650; margin: 0 0 12px; }
  .upv-dashboard .small-box p { font-size: 12px; color: #747b81; margin: 0; }
  .upv-dashboard .small-box .icon { top: 18px; right: 18px; color: #b4bfc8; font-size: 27px; }
  .upv-dashboard .small-box:hover .icon { font-size: 27px; }
  .upv-dashboard ~ .content { padding-top: 0; }
  @media (min-width: 768px) { .sidebar-mini.sidebar-collapse .upv-sidebar-intro { display: none; } }
  @media (max-width: 1100px) { .upv-workspace-label { display: none; } }
  @media (max-width: 767px) {
    .main-sidebar { padding-top: 128px; }
    .upv-page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .upv-page-heading h1 { font-size: 26px; }
    .upv-welcome { padding: 24px; }
    .upv-welcome h2 { font-size: 24px; }
    .upv-welcome .upv-solar-art { display: none; }
    .upv-dashboard > .row > div { min-width: 50%; }
  }
}

/* Detailed accueil dashboard. Existing markup and business data are preserved. */
@media screen {
  body:has(.upv-dashboard) { -webkit-font-smoothing: antialiased; }
  .content-wrapper:has(> .upv-dashboard) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: start;
    gap: 0 24px;
    padding: 32px;
    background: radial-gradient(ellipse at 95% 0, #dfe8f088, transparent 48%), #f0f3f6;
  }
  .content-wrapper > .upv-dashboard { grid-column: 1 / -1; padding: 0; min-height: 0; }
  .upv-dashboard ~ .content { padding: 0; min-height: 0; min-width: 0; }
  .upv-dashboard ~ .content > .row { margin: 0; }
  .upv-dashboard ~ .content > .row > .col-md-12 { padding: 0; }
  .content-wrapper:has(> .upv-dashboard) > .alert { grid-column: 1 / -1; }
  .upv-page-heading { margin: 2px 0 28px; }
  .upv-page-heading h1 { font-size: clamp(25px, 2.4vw, 35px); letter-spacing: -1.3px; color: #1e3040; }
  .upv-page-heading p { font-size: 13px; line-height: 1.7; }
  .upv-page-heading .upv-eyebrow { font-size: 9px; letter-spacing: 2.2px; }
  .upv-heading-tag { padding: 10px 16px; background: #fbfdfe; box-shadow: 0 2px 6px #24313d04; }
  .upv-welcome {
    position: relative; padding: 34px 40px; min-height: 234px;
    background: radial-gradient(ellipse at 85% 80%, #2b4459 0, transparent 55%), #152b3e;
    border: 1px solid #243c51; box-shadow: 0 8px 24px #182c3d10;
  }
  .upv-welcome::before {
    content: ''; position: absolute; width: 370px; height: 370px; right: -130px; top: -190px;
    border: 1px solid #abc6dd14; border-radius: 50%; box-shadow: 0 0 0 42px #abc6dd07, 0 0 0 84px #abc6dd04;
    pointer-events: none;
  }
  .upv-welcome > div { position: relative; z-index: 1; }
  .upv-welcome h2 { font-size: clamp(25px, 2.3vw, 34px); font-weight: 500; line-height: 1.25; }
  .upv-welcome p { font-size: 12px; line-height: 1.8; }
  .upv-welcome .upv-eyebrow { font-size: 9px; color: #7faed8; }
  .upv-welcome .upv-solar-art { margin-right: 24px; }
  .upv-dashboard > .row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0 0 28px; }
  .upv-dashboard > .row::before, .upv-dashboard > .row::after { display: none; }
  .upv-dashboard > .row > div { min-width: 0; width: auto; padding: 0; float: none; }
  .upv-dashboard .small-box {
    position: relative; height: 100%; min-height: 151px; margin: 0;
    overflow: hidden; border-radius: 14px; border-color: #d9e0e6;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  }
  .upv-dashboard .small-box::after {
    content: ''; position: absolute; bottom: 0; left: 20px; right: 20px; height: 3px;
    background: #d1dbe3; border-radius: 3px 3px 0 0;
  }
  .upv-dashboard .small-box .inner { display: flex; flex-direction: column; padding: 24px 20px 21px; }
  .upv-dashboard .small-box h1 { font-size: clamp(27px, 2.5vw, 38px); line-height: 1.2; font-weight: 600; letter-spacing: -1.1px; margin: 0 0 28px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; padding-right: 35px; }
  .upv-dashboard .small-box p { font-size: 11px; font-weight: 500; color: #6f787f; line-height: 1.6; }
  .upv-dashboard .small-box .icon {
    display: flex; align-items: center; justify-content: center; top: 22px; right: 17px;
    width: 34px; height: 34px; font-size: 17px; background: #e4ebf1; color: #586e82; border-radius: 10px;
  }
  .upv-dashboard .small-box:hover .icon { font-size: 17px; }
  .upv-dashboard .small-box.bg-green .icon { color: #275175; background: #e1e8ef; }
  .upv-dashboard .small-box.bg-blue .icon { color: #547c9b; background: #e8eff4; }
  .upv-dashboard .small-box.bg-yellow .icon { color: #2869a1; background: #d8eaf9; }
  .upv-dashboard .small-box.bg-red .icon { color: #a3785b; background: #e0ebf4; }
  .upv-dashboard .small-box.bg-yellow::after { background: #a3caed; }
  .upv-dashboard .small-box.bg-blue::after { background: #cbdde7; }
  .upv-dashboard .small-box.bg-red::after { background: #c3d6e6; }
  .upv-dashboard .small-box:hover, .upv-dashboard .small-box:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 24px #253b4e10; border-color: #a9bac8; outline: 0; }
  .upv-dashboard .small-box:focus-visible { box-shadow: 0 0 0 3px #91a5b666; }
  .upv-dashboard ~ .content .box { margin: 0 0 24px; border-radius: 16px; overflow: hidden; background: #fbfdfe; }
  .upv-dashboard ~ .content .box-header { padding: 22px 24px; border-color: #e6ebf0; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .upv-dashboard ~ .content .box-title { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; line-height: 1.6; }
  .upv-dashboard ~ .content .box-title::before { content: ''; display: block; height: 9px; width: 9px; flex-shrink: 0; border-radius: 3px; background: #376186; box-shadow: 0 0 0 4px #e5ecf2; }
  .upv-dashboard ~ .content .box-success .box-title::before { background: #3e89ca; box-shadow: 0 0 0 4px #ddecf9; }
  .upv-dashboard ~ .content .box-tools { position: static; display: flex; gap: 4px; flex-shrink: 0; }
  .upv-dashboard ~ .content .btn-box-tool { border: 1px solid #dee4ea; width: 28px; height: 28px; padding: 0; border-radius: 7px; background: #fbfdfe; color: #7f8a94; display: inline-flex; justify-content: center; align-items: center; }
  .upv-dashboard ~ .content .btn-box-tool:hover { background: #e5ecf3; color: #24415b; border-color: #c0cdd9; }
  .upv-dashboard ~ .content .btn-box-tool:focus-visible { outline: 2px solid #345e83; outline-offset: 2px; }
  .upv-dashboard ~ .content .box-body { padding: 20px 16px 16px; }
  #chartfournisseur, #chartclient { width: 100%; min-width: 0; height: 360px !important; border-radius: 6px; }
  .content-wrapper:has(> .upv-dashboard) .canvasjs-chart-toolbar { border-radius: 7px; }
  body:has(.upv-dashboard) .main-header .navbar { box-shadow: 0 1px 8px #172c3e04; }
  body:has(.upv-dashboard) .navbar .notifications-menu > a { opacity: .85; }
  body:has(.upv-dashboard) .navbar .notifications-menu > a:hover { opacity: 1; }
  body:has(.upv-dashboard) .navbar-nav > li > .dropdown-menu { border: 1px solid #d8dfe6; border-radius: 12px; box-shadow: 0 12px 40px #1b2d3c1a; overflow: hidden; }
  body:has(.upv-dashboard) .dropdown-menu > li.header { background: #f0f4f8 !important; color: #314250 !important; border-color: #dfe6ec; padding: 14px; }
  body:has(.upv-dashboard) .sidebar-menu .treeview-menu { border-radius: 0 0 10px 10px; margin: 0 12px 8px; }
  body:has(.upv-dashboard) .sidebar-menu a { transition: background-color .15s, color .15s; }
  body:has(.upv-dashboard) .main-footer { border-top: 1px solid #dfe4e9; }
  @media (min-width: 1600px) { .content-wrapper:has(> .upv-dashboard) { padding: 40px; gap: 0 28px; } #chartfournisseur, #chartclient { height: 410px !important; } }
  @media (max-width: 1199px) {
    .content-wrapper:has(> .upv-dashboard) { padding: 24px; gap: 0 18px; }
    .upv-dashboard > .row { gap: 10px; }
    .upv-dashboard .small-box .inner { padding: 20px 14px; }
    .upv-dashboard .small-box .icon { width: 27px; height: 27px; right: 11px; font-size: 14px; }
    .upv-dashboard .small-box:hover .icon { font-size: 14px; }
    .upv-dashboard ~ .content .box-header { padding: 18px 16px; }
    .upv-welcome .upv-solar-art { transform: scale(.85); transform-origin: right center; margin-right: 0; }
  }
  @media (max-width: 991px) {
    .content-wrapper:has(> .upv-dashboard) { grid-template-columns: minmax(0, 1fr); }
    .upv-dashboard > .row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .upv-dashboard .small-box h1 { font-size: 32px; }
    .upv-welcome { padding: 28px; }
    .upv-welcome .upv-solar-art { width: 200px; }
  }
  @media (max-width: 767px) {
    .content-wrapper:has(> .upv-dashboard) { padding: 20px 16px; }
    .upv-page-heading { margin: 0 0 20px; gap: 14px; }
    .upv-page-heading p { font-size: 12px; }
    .upv-heading-tag { font-size: 10px; padding: 7px 12px; }
    .upv-welcome { padding: 26px; min-height: 205px; margin-bottom: 20px; }
    .upv-welcome h2 { font-size: 27px; }
    .upv-dashboard > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
    .upv-dashboard > .row > div { min-width: 0; }
    .upv-dashboard .small-box { min-height: 137px; }
    .upv-dashboard .small-box .inner { padding: 20px 16px; }
    .upv-dashboard .small-box h1 { margin-bottom: 24px; }
    .upv-dashboard ~ .content .box { margin-bottom: 20px; }
    #chartfournisseur, #chartclient { height: 310px !important; }
  }
  @media (max-width: 359px) { .upv-dashboard > .row { grid-template-columns: 1fr; } .upv-welcome { padding: 22px; } .upv-welcome h2 { font-size: 23px; } }
  @media (prefers-reduced-motion: reduce) { .upv-dashboard .small-box, body:has(.upv-dashboard) .sidebar-menu a { transition: none; } .upv-dashboard .small-box:hover { transform: none; } }
}
@media screen {
  .content-wrapper:has(> .upv-dashboard) > .content { width: 100%; margin-left: 0; margin-right: 0; }
  .upv-dashboard h1, .upv-dashboard h2, .upv-dashboard ~ .content .box-title { font-family: inherit; }
  .upv-dashboard ~ .content .box-body,
  #chartfournisseur, #chartclient { overflow: hidden !important; }
}

/* UPV navigation system. One set of rules for the header, sidebar and popovers. */
@media screen {
  .main-header .logo { height: 76px; line-height: 76px; background: #10273c !important; border-bottom: 1px solid #ffffff14; font-family: inherit; }
  .main-header .logo .logo-lg { font-size: 29px; font-weight: 750; letter-spacing: -1px; }
  .main-header .logo .logo-lg i, .main-header .logo .logo-mini { color: #72b1e8; }
  .main-header .logo .logo-lg small { color: #cad5df; font-size: 8px; letter-spacing: 1.5px; }
  .main-header .navbar { min-height: 76px; background: #fff !important; border: 0; border-bottom: 1px solid #e5e9ec; box-shadow: 0 3px 18px #152a3d04; }
  .main-header .navbar .sidebar-toggle { width: 38px; height: 38px; padding: 0; margin: 19px 18px; display: grid; place-items: center; border-radius: 10px; color: #546370 !important; border: 1px solid #e1e6ea; background: #fff; }
  .main-header .navbar .sidebar-toggle:hover { background: #e9eff4 !important; }
  .upv-workspace-label { padding: 28px 0; font-size: 11px; color: #8a9197; }
  .upv-workspace-label strong { font-size: 12px; color: #293c4c; }
  .main-header .navbar-custom-menu { padding: 16px 24px 16px 0; }
  .main-header .navbar-custom-menu > .navbar-nav { display: flex; align-items: center; gap: 10px; margin: 0; }
  .main-header .navbar-custom-menu > .navbar-nav > li { float: none; }
  .main-header .navbar-custom-menu .notifications-menu > a {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 9px;
    height: 44px; min-width: 44px; padding: 0 14px !important; color: #495560 !important;
    border: 1px solid transparent; border-radius: 11px; background: #f2f5f7; opacity: 1 !important;
    transition: background-color .18s, border-color .18s;
  }
  .main-header .navbar-custom-menu .notifications-menu > a::after { font-size: 11px; font-weight: 600; letter-spacing: .1px; }
  .main-header .navbar-custom-menu .notifications-menu:nth-child(1) > a::after { content: 'Articles'; }
  .main-header .navbar-custom-menu .notifications-menu:nth-child(2) > a::after { content: 'Échéances'; }
  .main-header .navbar-custom-menu .notifications-menu:nth-child(3) > a::after { content: 'Stock'; }
  .main-header .navbar-custom-menu .notifications-menu > a:hover,
  .main-header .navbar-custom-menu .notifications-menu.open > a { background: #e3eaf1 !important; border-color: #c8d5e0; }
  .main-header .navbar-custom-menu .notifications-menu > a > i { width: 19px; height: 19px; flex-shrink: 0; color: #5c6a77; }
  .main-header .navbar-custom-menu .notifications-menu > a > .label {
    position: absolute; top: -5px; right: -4px; min-width: 19px; height: 18px; padding: 2px 4px;
    border: 2px solid #fff; border-radius: 6px; background: #6aade7 !important; color: #1d3a54 !important;
    font-size: 9px; font-weight: 700; line-height: 10px;
  }
  .main-header .navbar-custom-menu .notifications-menu > a > .label[data-upv-empty="true"] { display: none; }
  .main-header .navbar-custom-menu .user-menu { padding-left: 17px; margin-left: 7px; border-left: 1px solid #e1e6ea; }
  .main-header .navbar-custom-menu .user-menu > a {
    height: 44px; display: flex; align-items: center; gap: 11px; padding: 0 13px 0 6px !important;
    background: #fff; border: 1px solid #d5dee5; border-radius: 24px; font-size: 12px; font-weight: 650; color: #273b4c !important; cursor: pointer;
  }
  .main-header .navbar-custom-menu .user-menu > a > i { width: 32px; height: 32px; border-radius: 50%; background: #e1eaf1; color: #4c657b; display: grid; place-items: center; }
  .main-header .navbar-custom-menu .user-menu > a::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid #677d90; border-bottom: 1.5px solid #677d90; transform: rotate(45deg); margin: -3px 0 0 2px; }
  .main-header .navbar-custom-menu .user-menu > a:hover,
  .main-header .navbar-custom-menu .user-menu.open > a { background: #f1f5f9 !important; border-color: #9eb0bf; }
  .main-header .navbar-custom-menu .dropdown > .dropdown-menu {
    display: none !important; position: absolute; top: calc(100% + 16px); left: auto; right: 0;
    padding: 0; border: 1px solid #dce3e9 !important; border-radius: 16px !important;
    background: #fff; box-shadow: 0 18px 60px #182a3a24 !important; overflow: hidden;
  }
  .main-header .navbar-custom-menu .dropdown.open > .dropdown-menu { display: block !important; }
  .main-header .navbar-custom-menu .notifications-menu > .dropdown-menu { width: 360px; }
  .main-header .navbar-custom-menu .notifications-menu > .dropdown-menu > li.header {
    padding: 23px 22px 18px !important; background: #fff !important; color: #283b4b !important;
    text-align: left; font-size: 13px; font-weight: 650; line-height: 1.7; white-space: normal; border-bottom: 1px solid #e8ecf0;
  }
  .main-header .navbar-custom-menu .notifications-menu > .dropdown-menu > li.header::before { content: 'CENTRE DE NOTIFICATIONS'; display: block; font-size: 8px; letter-spacing: 1.7px; font-weight: 600; color: #909eaa; margin-bottom: 6px; }
  .main-header .navbar-custom-menu .notifications-menu .menu { max-height: 320px; scrollbar-width: thin; scrollbar-color: #a6b6c4 transparent; }
  .main-header .navbar-custom-menu .notifications-menu .menu > li { padding: 16px 22px; margin: 0 !important; line-height: 1.8; font-size: 11px; color: #5f6971; background: #fff; border-bottom: 1px solid #ebeff3; white-space: normal; overflow-wrap: anywhere; }
  .main-header .navbar-custom-menu .notifications-menu .menu > li:hover { background: #f3f6f9; }
  .main-header .navbar-custom-menu .notifications-menu .menu > li > i { color: #7792a9 !important; margin-right: 8px; }
  .main-header .navbar-custom-menu .notifications-menu .menu > li > span { color: #526371 !important; }
  .main-header .navbar-custom-menu .menu[data-upv-empty="true"]::before { content: 'Vous êtes à jour. Aucune notification.'; display: block; padding: 44px 22px; font-size: 12px; color: #808e9b; text-align: center; }
  .main-header .navbar-custom-menu .menu[data-upv-empty="true"] > li { display: none; }
  .main-header .navbar-custom-menu .slimScrollBar { background: #8fa2b2 !important; opacity: .45 !important; }
  .main-header .navbar-custom-menu .user-menu > .dropdown-menu { width: 240px; padding: 12px; }
  .main-header .navbar-custom-menu .user-menu > .dropdown-menu::before { content: 'VOTRE COMPTE UPV'; display: block; padding: 9px 9px 17px; margin-bottom: 8px; border-bottom: 1px solid #e8ecf0; font-size: 9px; font-weight: 650; letter-spacing: 1.5px; color: #7f8e9c; }
  .main-header .navbar-custom-menu .user-menu .dropdown-menu a[href*="/logout"] {
    display: flex; align-items: center; gap: 11px; width: 100%; padding: 14px; margin: 0;
    border-radius: 10px; border: 0; background: #e9f2f9; color: #a06347; text-align: left;
    font-size: 12px; font-weight: 600; text-decoration: none; box-shadow: none;
  }
  .main-header .navbar-custom-menu .user-menu .dropdown-menu a[href*="/logout"]::before { content: ''; display: block; width: 19px; height: 19px; flex-shrink: 0; background: currentColor; }
  .main-header .navbar-custom-menu .user-menu .dropdown-menu a[href*="/logout"]:hover { background: #f2e2d7; color: #884d33; }
  .main-header .navbar-custom-menu .user-menu .dropdown-menu li { list-style: none; }
  .main-header a:focus-visible { outline: 3px solid #89a3b9; outline-offset: 3px; }

  .main-sidebar { padding-top: 76px; background: #10273c !important; }
  .upv-sidebar-intro { padding: 29px 9px 25px; margin: 0 18px 18px; border-bottom: 1px solid #ffffff12; }
  .upv-sidebar-intro > span { font-size: 8px; letter-spacing: 2px; color: #8596a5; }
  .upv-sidebar-intro > strong { font-size: 12px; color: #c9d2da; margin-top: 8px; font-weight: 400; }
  .main-sidebar .sidebar-menu > li { margin-bottom: 6px; }
  .main-sidebar .sidebar-menu > li > a {
    display: flex; align-items: center; gap: 11px; margin: 0 12px; min-height: 49px; padding: 10px 12px;
    border: 1px solid transparent !important; border-radius: 11px; font-size: 12px; color: #afbcc8 !important;
    font-weight: 500; transition: background-color .15s, color .15s;
  }
  .main-sidebar .sidebar-menu > li > a > .fa,
  .main-sidebar .sidebar-menu > li > a > .ion { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; margin: 0; border-radius: 8px; font-size: 14px; color: #9baebe !important; background: #ffffff07; }
  .main-sidebar .sidebar-menu > li > a .pull-right-container i { color: #7e92a3 !important; font-size: 11px; }
  .main-sidebar .sidebar-menu > li:hover > a,
  .main-sidebar .sidebar-menu > li.menu-open > a { background: #ffffff09 !important; color: #e7eef4 !important; }
  .main-sidebar .sidebar-menu > li.active > a { color: #24323e !important; background: #7bb6e9 !important; box-shadow: 0 4px 12px #04101a12; font-weight: 650; }
  .main-sidebar .sidebar-menu > li.active > a > .fa,
  .main-sidebar .sidebar-menu > li.active > a > .ion { color: #32485b !important; background: #ffffff30; }
  .main-sidebar .sidebar-menu > li.active > a .pull-right-container i { color: #3e566b !important; }
  .main-sidebar .sidebar-menu > li > .treeview-menu { margin: 3px 12px 12px !important; padding: 9px 0 9px 20px; border-radius: 0; background: transparent !important; }
  .main-sidebar .treeview-menu > li { border-left: 1px solid #ffffff13; }
  .main-sidebar .treeview-menu > li > a { padding: 10px 12px; margin-left: 10px; border-radius: 7px; font-size: 11px; line-height: 1.6; color: #96a7b5 !important; white-space: normal; }
  .main-sidebar .treeview-menu > li > a > .fa-circle-o { font-size: 5px; color: #657a8c !important; width: 12px; vertical-align: middle; }
  .main-sidebar .treeview-menu > li > a:hover { color: #e6edf4 !important; background: #ffffff07; }
  .main-sidebar .treeview-menu > li.active > a { color: #8ec1ed !important; background: #ffffff09; }
  .main-sidebar .sidebar-menu > li.header { background: transparent !important; padding: 23px 26px 10px; font-size: 9px; letter-spacing: 1.5px; color: #6e8599 !important; }
  .main-sidebar a:focus-visible { outline: 2px solid #7bb6e9; outline-offset: 2px; }
  .fixed .content-wrapper, .fixed .right-side { padding-top: 76px; }
  @media (min-width: 768px) {
    .sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li > a { display: block; margin: 0 4px; padding: 9px 6px; }
    .sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li:hover > a > span:not(.pull-right-container) { left: 46px; padding: 14px 18px; background: #20384d; color: #fff; }
    .sidebar-mini.sidebar-collapse .main-sidebar .sidebar-menu > li:hover > .treeview-menu { left: 50px; margin: 0 !important; background: #10273c !important; padding-left: 8px; }
  }
  @media (max-width: 1199px) { .main-header .navbar-custom-menu .notifications-menu > a::after { display: none; } .main-header .navbar-custom-menu .notifications-menu > a { padding: 0 12px !important; } }
  @media (max-width: 767px) {
    .main-header .logo { height: 56px; line-height: 56px; }
    .main-header .navbar { min-height: 64px; }
    .main-header .navbar .sidebar-toggle { width: 36px; height: 36px; margin: 14px 12px; }
    .main-header .navbar-custom-menu { padding: 12px; }
    .main-header .navbar-custom-menu > .navbar-nav { gap: 6px; }
    .main-header .navbar-custom-menu .notifications-menu > a { min-width: 36px; height: 40px; padding: 0 9px !important; }
    .main-header .navbar-custom-menu .user-menu { padding-left: 9px; margin-left: 3px; }
    .main-header .navbar-custom-menu .user-menu > a { height: 40px; padding: 0 7px 0 4px !important; gap: 3px; }
    .main-header .navbar-custom-menu .user-menu > a > i { width: 30px; height: 30px; }
    .main-header .navbar-custom-menu .notifications-menu > .dropdown-menu { position: fixed; top: 120px; right: 12px; width: min(360px, calc(100vw - 24px)); }
    .main-header .navbar-custom-menu .user-menu > .dropdown-menu { top: calc(100% + 12px); }
    .main-sidebar { padding-top: 120px; }
    .fixed .content-wrapper, .fixed .right-side { padding-top: 120px; }
  }
  @media (prefers-reduced-motion: reduce) { .main-header .navbar-custom-menu .notifications-menu > a, .main-sidebar .sidebar-menu > li > a { transition: none; } }
}

/* Local vector controls: crisp icons independent of the legacy icon font. */
@media screen {
.main-header .navbar .sidebar-toggle::before { content: ""; display: block; width: 19px; height: 19px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%206h16M4%2012h16M4%2018h16%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%206h16M4%2012h16M4%2018h16%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.main-header .navbar-custom-menu .notifications-menu:nth-child(1) > a > i::before { content: ""; display: block; width: 19px; height: 19px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m12%203%209%205-9%205-9-5%209-5Zm-9%205v9l9%205%209-5V8M12%2013v9M7.5%205.5l9%205%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m12%203%209%205-9%205-9-5%209-5Zm-9%205v9l9%205%209-5V8M12%2013v9M7.5%205.5l9%205%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.main-header .navbar-custom-menu .notifications-menu:nth-child(2) > a > i::before { content: ""; display: block; width: 19px; height: 19px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M7%203v4M17%203v4M3%2011h18m-13%205%203%203%205-5%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M7%203v4M17%203v4M3%2011h18m-13%205%203%203%205-5%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.main-header .navbar-custom-menu .notifications-menu:nth-child(3) > a > i::before { content: ""; display: block; width: 19px; height: 19px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m10.2%204-8%2014A2%202%200%200%200%204%2021h16a2%202%200%200%200%201.8-3l-8-14a2%202%200%200%200-3.6%200Z%22%2F%3E%3Cpath%20d%3D%22M12%209v5m0%203v.1%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m10.2%204-8%2014A2%202%200%200%200%204%2021h16a2%202%200%200%200%201.8-3l-8-14a2%202%200%200%200-3.6%200Z%22%2F%3E%3Cpath%20d%3D%22M12%209v5m0%203v.1%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.main-header .navbar-custom-menu .user-menu > a > i::before { content: ""; display: block; width: 19px; height: 19px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M4%2021v-2a8%208%200%200%201%2016%200v2%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%224%22%2F%3E%3Cpath%20d%3D%22M4%2021v-2a8%208%200%200%201%2016%200v2%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.main-header .navbar-custom-menu .user-menu .dropdown-menu a[href*="/logout"]::before { content: ""; display: block; width: 19px; height: 19px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%204H5a2%202%200%200%200-2%202v12a2%202%200%200%200%202%202h4m5-13%205%205-5%205m-6-5h11%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%204H5a2%202%200%200%200-2%202v12a2%202%200%200%200%202%202h4m5-13%205%205-5%205m-6-5h11%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
}
@media screen {
  .main-header .navbar .navbar-custom-menu .notifications-menu > a > .label {
    position: absolute !important; top: -5px !important; right: -4px !important;
  }
}

/* Style both legacy br-separated notifications and individual notification rows. */
@media screen {
  .main-header .navbar-custom-menu .notifications-menu > .dropdown-menu { width: min(410px, calc(100vw - 24px)); }
  .main-header .navbar-custom-menu .notifications-menu .dropdown-menu > li.header {
    background: #f2f6f9 !important; padding: 22px 24px 19px !important;
    color: #24394b !important; border-bottom: 1px solid #dfe6ec;
  }
  .main-header .navbar-custom-menu .notifications-menu .slimScrollDiv {
    height: auto !important; max-height: none !important; overflow: visible !important;
  }
  .main-header .navbar-custom-menu .notifications-menu .menu {
    height: min(380px, 52vh) !important; max-height: 380px !important; width: 100% !important;
    overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain;
    padding: 10px !important; background: #fff; scrollbar-width: thin; scrollbar-color: #aabccb #f3f6f9;
  }
  .main-header .navbar-custom-menu .notifications-menu .menu > li {
    display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; row-gap: 0;
    align-items: start; padding: 0 !important; margin: 0 !important;
    border: 0; color: #485561; font-size: 11px; line-height: 1.65; background: #fff;
  }
  .main-header .navbar-custom-menu .notifications-menu .menu > li:hover { background: #fff; }
  .main-header .navbar-custom-menu .notifications-menu .menu > li > br { display: none; }
  .main-header .navbar-custom-menu .notifications-menu .menu > li > i {
    grid-column: 1; display: grid; place-items: center; width: 32px; height: 32px;
    margin: 13px 0 13px 6px; border-radius: 10px; background: #e5ecf3;
    color: #62819c !important; font-size: 14px; align-self: start;
  }
  .main-header .navbar-custom-menu .notifications-menu .menu > li > span {
    grid-column: 2; min-width: 0; display: flex; align-items: center; min-height: 59px;
    padding: 13px 12px 13px 0; border-bottom: 1px solid #e7ecf1;
    font-family: inherit; color: #445360 !important; font-size: 11px; font-weight: 500;
    line-height: 1.7; white-space: normal; overflow-wrap: anywhere;
  }
  .main-header .navbar-custom-menu .notifications-menu .menu > li > span:hover { color: #24394b !important; background: #f4f7fa; }
  .main-header .navbar-custom-menu .notifications-menu .menu > li:not(:has(> span)) {
    display: block; padding: 14px !important; border-bottom: 1px solid #e7ecf1; line-height: 1.9;
  }
  .main-header .navbar-custom-menu .notifications-menu .slimScrollBar,
  .main-header .navbar-custom-menu .notifications-menu .slimScrollRail { display: none !important; }
  .main-header .navbar-custom-menu .notifications-menu .menu::-webkit-scrollbar { width: 5px; }
  .main-header .navbar-custom-menu .notifications-menu .menu::-webkit-scrollbar-thumb { background: #aabccb; border-radius: 5px; }
  .main-header .navbar-custom-menu .notifications-menu .menu:focus-visible { outline: 2px solid #87a2b9; outline-offset: -3px; }
  .main-header .navbar-custom-menu .notifications-menu .menu[data-upv-empty="true"] { height: auto !important; min-height: 130px; }
  .main-header .navbar-custom-menu .notifications-menu .menu[data-upv-empty="true"] > li { display: none; }
}

/* Pending notifications stay highlighted until their actual count reaches zero. */
@media screen {
  .main-header .navbar-custom-menu .notifications-menu.upv-needs-attention > a {
    background: #d4e7f8 !important; border-color: #56a2e4 !important;
    color: #174f80 !important; box-shadow: 0 0 0 3px #71b0e81a;
    animation: upv-notification-attention 2s ease-in-out 3;
  }
  .main-header .navbar-custom-menu .notifications-menu.upv-needs-attention > a > i { color: #2067a5; }
  .main-header .navbar-custom-menu .notifications-menu.upv-needs-attention > a > .label {
    background: #1d6db3 !important; color: #fff !important; border-color: #fff !important;
  }
  .main-header .navbar-custom-menu .notifications-menu.upv-needs-attention > a:hover,
  .main-header .navbar-custom-menu .notifications-menu.upv-needs-attention.open > a {
    background: #b1d4f2 !important; border-color: #3c89cc !important;
  }
  @keyframes upv-notification-attention {
    0%, 100% { box-shadow: 0 0 0 3px #71b0e81a; }
    50% { box-shadow: 0 0 0 6px #71b0e840; }
  }
  @media (prefers-reduced-motion: reduce) {
    .main-header .navbar-custom-menu .notifications-menu.upv-needs-attention > a { animation: none; }
  }
}

/* Database-backed UPV overview. */
@media screen {
  .upv-overview { max-width: 1680px; padding: 32px; margin: 0 auto; font-size: 13px; color: #243747; }
  .upv-overview h1, .upv-overview h2, .upv-overview h3 { font-family: inherit; }
  .ov-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 6px 0 28px; }
  .ov-eyebrow { font-size: 8px; letter-spacing: 1.8px; font-weight: 650; color: #808e9b; }
  .ov-heading h1 { font-size: clamp(25px,2.5vw,37px); font-weight: 600; letter-spacing: -1.4px; margin: 10px 0; }
  .ov-heading h1 > span { color: #4c82b2; }
  .ov-heading p { color: #7e8890; font-size: 12px; margin: 0; }
  .ov-period { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #d9e0e7; border-radius: 12px; background: #fbfdfe; flex-shrink: 0; }
  .ov-period label { margin: 0 5px; font-size: 11px; color: #768491; }
  .ov-period input.form-control, .ov-period input { width: 78px; height: 34px; min-height: 34px; padding: 5px; border: 0; background: transparent; font-weight: 600; box-shadow: none; }
  .ov-period .btn { background: #1b4060; color: #fff; font-size: 10px; padding: 9px 12px; }
  .ov-period .btn i { margin-right: 5px; }
  .ov-hero { display: flex; align-items: center; justify-content: space-between; padding: 32px 42px; border-radius: 18px; background: radial-gradient(ellipse at right,#31475b,transparent 65%),#122a3f; color: #e9f0f7; margin-bottom: 28px; overflow: hidden; }
  .ov-hero .ov-eyebrow { color: #7faacf; }
  .ov-hero h2 { font-size: clamp(25px,2.5vw,35px); line-height: 1.2; font-weight: 500; letter-spacing: -.8px; margin: 16px 0; }
  .ov-hero p { font-size: 11px; color: #b4bfc8; }
  .ov-live { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 9px; color: #c4d2de; padding: 7px 11px; border-radius: 20px; border: 1px solid #bbd1e520; background: #ffffff05; }
  .ov-live i { width: 5px; height: 5px; border-radius: 50%; background: #6bade6; }
  .ov-hero .upv-solar-art { margin-right: 30px; }
  .ov-section-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 26px 0 15px; }
  .ov-section-label h2 { font-size: 14px; font-weight: 600; margin: 0; }
  .ov-section-label > span { font-size: 9px; color: #86929d; }
  .ov-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
  .ov-kpi { background: #fbfdfe; border: 1px solid #d8e0e7; border-radius: 13px; padding: 21px; min-width: 0; }
  .ov-kpi-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #73818d; font-size: 10px; }
  .ov-kpi-title > i { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: #e3eaf1; color: #576d81; font-size: 13px; flex-shrink: 0; }
  .ov-gold .ov-kpi-title > i { background: #d9e8f6; color: #4576a0; }
  .ov-orange .ov-kpi-title > i { background: #e1edf7; color: #5888b2; }
  .ov-blue .ov-kpi-title > i { background: #e9f0f1; color: #687b8c; }
  .ov-kpi-value { font-size: clamp(22px,2vw,31px); font-weight: 600; letter-spacing: -.7px; margin: 16px 0 11px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  .ov-kpi-value small { margin-left: 6px; font-size: 10px; font-weight: 400; color: #8d99a3; letter-spacing: 0; }
  .ov-kpi-note { color: #84909b; font-size: 9px; }
  .ov-main-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 22px; margin-bottom: 22px; }
  .ov-card { background: #fbfdfe; border: 1px solid #d8e0e7; border-radius: 15px; min-width: 0; overflow: hidden; }
  .ov-card-heading { padding: 23px 24px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .ov-card-heading h2 { font-size: 15px; font-weight: 600; margin: 8px 0 0; letter-spacing: -.2px; }
  .ov-card-heading .ov-eyebrow { font-size: 7px; }
  .ov-tag { font-size: 9px; color: #7b8a97; border: 1px solid #dbe3ea; padding: 5px 9px; border-radius: 7px; white-space: nowrap; }
  .ov-card-icon { color: #4981b2; font-size: 23px; }
  .ov-chart-summary { display: flex; gap: 35px; padding: 0 24px 20px; }
  .ov-chart-summary > div > span { display: block; color: #7d8b98; font-size: 9px; margin-bottom: 7px; }
  .ov-chart-summary strong { font-size: 20px; font-weight: 600; }
  .ov-chart-summary small { font-size: 8px; color: #8c97a1; font-weight: 400; }
  .ov-legend { display: flex; align-items: center; gap: 17px; margin: 0 24px; color: #818e99; font-size: 8px; flex-wrap: wrap; }
  .ov-legend > span { display: flex; align-items: center; gap: 5px; }
  .ov-legend > span:last-child { margin-left: auto; font-size: 7px; }
  .ov-legend i { width: 6px; height: 6px; border-radius: 2px; background: #345776; }
  .ov-legend > span:nth-child(2) i { background: #63a7e2; }
  .ov-chart { position: relative; display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 6px; height: 205px; margin: 20px 24px; background: repeating-linear-gradient(to top,transparent 0,transparent 42px,#dfe6ed 43px,#dfe6ed 44px); }
  .ov-chart-month { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
  .ov-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 180px; }
  .ov-bar { width: 32%; max-width: 16px; border-radius: 3px 3px 0 0; background: #345776; }
  .ov-purchases { background: #63a7e2; }
  .ov-chart-month > span { padding-top: 10px; height: 25px; text-align: center; font-size: 8px; color: #7d8d9b; background: #fbfdfe; }
  .ov-chart-empty { position: absolute; inset: 35px 0 40px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; background: #fbfdfee8; color: #92a2b0; text-align: center; pointer-events: none; }
  .ov-chart-empty > i { color: #a6b8c8; font-size: 22px; }
  .ov-chart-empty strong { font-size: 12px; color: #697783; font-weight: 500; }
  .ov-chart-empty > span { font-size: 10px; }
  .ov-data { border-top: 1px solid #e5ebf0; padding: 12px 24px; }
  .ov-data summary { font-size: 9px; color: #748798; cursor: pointer; }
  .ov-catalog-total { display: flex; align-items: center; gap: 18px; padding: 0 24px 22px; }
  .ov-catalog-total > strong { font-size: 44px; font-weight: 500; letter-spacing: -1.5px; }
  .ov-catalog-total > span { font-size: 11px; line-height: 1.9; color: #708190; }
  .ov-catalog-total small { font-size: 8px; color: #8f9ca7; }
  .ov-family-list { padding: 0 24px; }
  .ov-family { margin-bottom: 16px; }
  .ov-family > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; margin-bottom: 8px; }
  .ov-family strong { font-size: 10px; font-weight: 500; color: #768897; }
  .ov-track { height: 5px; border-radius: 4px; background: #e7edf2; overflow: hidden; }
  .ov-track > span { display: block; height: 100%; background: #7993a9; border-radius: 4px; }
  .ov-family:nth-child(2n) .ov-track > span { background: #78a9d4; }
  .ov-footnote { font-size: 8px; color: #8c9aa6; margin: 20px 24px; }
  .ov-resources { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
  .ov-resources > article { display: grid; grid-template-columns: 33px 1fr; column-gap: 13px; padding: 18px; background: #fbfdfe; border: 1px solid #d8e0e7; border-radius: 12px; }
  .ov-resources i { grid-row: 1 / 3; align-self: center; display: grid; place-items: center; width: 33px; height: 36px; border-radius: 9px; background: #e9eff4; color: #748ba0; font-size: 15px; }
  .ov-resources strong { font-weight: 600; font-size: 23px; line-height: 1.2; }
  .ov-resources span { color: #8392a0; font-size: 9px; margin-top: 4px; }
  .ov-empty { min-height: 205px; display: flex; justify-content: center; align-items: center; flex-direction: column; padding: 25px; text-align: center; }
  .ov-empty > i { display: grid; place-items: center; width: 44px; height: 44px; background: #e9eff5; border: 1px solid #d9e3ec; border-radius: 13px; color: #99adbf; font-size: 21px; }
  .ov-empty h3 { font-size: 12px; font-weight: 500; color: #697885; margin: 17px 0 8px; }
  .ov-empty p { font-size: 10px; color: #8b9aa7; max-width: 270px; line-height: 1.8; }
  .ov-table-scroll { overflow-x: auto; }
  .upv-overview table { width: 100%; white-space: nowrap; font-size: 10px; }
  .upv-overview th { padding: 12px 20px; background: #eff4f8; color: #7e8e9c; font-weight: 500; }
  .upv-overview td { padding: 13px 20px; border-top: 1px solid #e6ecf1; color: #617383; }
  .upv-overview td > strong { display: block; font-weight: 500; color: #374958; }
  .upv-overview td > span:not(.ov-payment) { display: block; font-size: 9px; margin-top: 5px; }
  .ov-payment { display: inline-block; background: #e1eaf2; border-radius: 5px; padding: 4px 6px; font-size: 9px; color: #566f84; }
  .ov-payment.ov-unpaid { background: #faf0d8; color: #ac8b40; }
  .ov-ranking { margin: 0; padding: 0 24px 20px; list-style-position: inside; }
  .ov-ranking li { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-top: 1px solid #e4eaf0; font-size: 10px; }
  .ov-ranking small { display: block; font-size: 8px; color: #8a98a5; margin-top: 6px; font-weight: 400; }
  .ov-ranking strong { white-space: nowrap; font-weight: 500; }
  .ov-quality { padding: 25px 28px; background: #e4ebf1; border: 1px solid #d0dce7; border-radius: 14px; }
  .ov-quality h2 { font-size: 17px; font-weight: 500; margin: 9px 0; }
  .ov-quality p { font-size: 11px; color: #768a9b; }
  .ov-quality-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 24px; }
  .ov-quality-metrics > div { display: flex; align-items: center; gap: 12px; border-left: 2px solid #bfcfdd; padding-left: 16px; }
  .ov-quality-metrics strong { font-size: 24px; font-weight: 500; }
  .ov-quality-metrics span { color: #6f8497; font-size: 10px; }
  .ov-disclaimer { font-size: 9px; line-height: 1.9; color: #8e98a1; margin-top: 20px; }
  .ov-disclaimer i { margin-right: 5px; }
  .ov-muted { font-size: 11px; color: #8b97a1; }
  @media (max-width: 1199px) { .ov-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); } .ov-resources { grid-template-columns: repeat(3,minmax(0,1fr)); } .ov-heading { align-items: flex-start; flex-direction: column; } }
  @media (max-width: 991px) { .ov-main-grid { grid-template-columns: minmax(0,1fr); } .ov-hero .upv-solar-art { transform: scale(.8); transform-origin: right center; width: 200px; margin-right: 0; } .ov-quality-metrics { grid-template-columns: 1fr; gap: 18px; } }
  @media (max-width: 767px) { .upv-overview { padding: 24px 16px; } .ov-hero { padding: 26px; } .ov-hero .upv-solar-art { display: none; } .ov-heading h1 { font-size: 28px; } .ov-heading p { line-height: 1.8; } .ov-section-label { align-items: flex-start; flex-direction: column; gap: 7px; } .ov-kpis { gap: 12px; } .ov-kpi { padding: 16px; } .ov-kpi-title { font-size: 9px; gap: 5px; } .ov-kpi-value { font-size: 21px; } .ov-kpi-note { font-size: 8px; line-height: 1.7; display: block; } .ov-resources { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; } .ov-card-heading { padding: 20px; } .ov-chart { margin: 20px 14px; gap: 3px; } .ov-chart-month > span { font-size: 7px; } .ov-chart-summary { gap: 20px; } .ov-chart-summary strong { font-size: 18px; } .ov-legend { gap: 9px; } .ov-legend > span:last-child { display: none; } .ov-chart-empty > span { max-width: 220px; line-height: 1.8; } }
  @media (max-width: 359px) { .ov-kpis { grid-template-columns: 1fr; } }
}
@media screen {
  .ov-kpi-title, .ov-heading p { color: #5d6a76; }
  .ov-kpi-note, .ov-section-label > span, .ov-family > div:first-child, .ov-footnote { color: #667583; font-size: 10px; }
  .ov-empty p, .ov-chart-empty > span { color: #697b8b; font-size: 11px; }
  .ov-disclaimer { color: #6c7984; font-size: 10px; }
  .ov-period button:focus-visible, .ov-data summary:focus-visible { outline: 3px solid #7492ad; outline-offset: 3px; }
}

/* UPV logo and primary brand color. */
@media screen {
  body { --ui-primary: #2265a1; }
  .main-header .logo { background: #f7f7f7 !important; padding: 4px 15px; line-height: normal; }
  .main-header .logo img { display: inline-block; width: auto; max-width: 100%; height: 64px; object-fit: contain; vertical-align: middle; }
  .main-header .logo .logo-mini img { width: 42px; height: 42px; }
  .sidebar-mini.sidebar-collapse .main-header .logo { padding: 4px; }
  .btn-primary { background: #2265a1; border-color: #2265a1; color: #fff; }
  .btn-primary:hover, .btn-primary:focus { background: #194d7c; border-color: #194d7c; }
  @media (max-width: 767px) { .main-header .logo img { height: 44px; } }
}
