/* AcreNxt brand system. Loaded after module styles; status colors remain semantic. */
:root {
  --acre-navy: #0B2D5C;
  --acre-blue: #087FEA;
  --acre-gold: #FF9D00;
  --acre-action: #0668C2; /* White button labels meet WCAG AA. */
  --acre-bg: #F3F7FC;
  --acre-surface: #FFFFFF;
  --acre-text: #18324F;
  --acre-muted: #60748D;
  --acre-line: #DCE6F2;
  --acre-soft: #EAF4FF;
  --primary: var(--acre-blue);
  --bs-primary: var(--acre-blue);
  --bs-primary-rgb: 8, 127, 234;
  --lx-navy: var(--acre-navy);
  --lx-navy-2: var(--acre-navy);
  --lx-blue: var(--acre-blue);
  --lx-cyan: var(--acre-blue);
  --lx-amber: var(--acre-gold);
}
html[data-theme="dark"] {
  --acre-bg: #07182E;
  --acre-surface: #102A49;
  --acre-text: #E9F2FF;
  --acre-muted: #ADC0D8;
  --acre-line: #2A4565;
  --acre-soft: #16395F;
  --lx-navy: #E9F2FF;
  --lx-navy-2: #ADCFFF;
}
body:not(.acre-login), body.hrms-theme {
  --hrms-navy: var(--acre-navy);
  --hrms-blue: var(--acre-blue);
  --hrms-cyan: var(--acre-blue);
  --hrms-amber: var(--acre-gold);
  color: var(--acre-text);
  background: radial-gradient(ellipse at top right, #087fea0d, transparent 45%), var(--acre-bg);
}
.navbar-bg { background: var(--acre-navy) !important; border-bottom: 3px solid var(--acre-gold); }
.main-sidebar, #sidebar-wrapper { background: var(--acre-surface) !important; }
#sidebar-wrapper .sidebar-brand {
  background: #fff !important;
  border-bottom: 3px solid var(--acre-gold);
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#sidebar-wrapper .sidebar-brand a { width: 100%; line-height: normal; }
#sidebar-wrapper .header-logo { width: 205px; max-width: 90%; height: auto; max-height: 76px; object-fit: contain; filter: none; }
img.acre-application-logo { width: 210px; max-width: 100%; height: auto; object-fit: contain; }
.sidebar-mini #sidebar-wrapper .sidebar-brand { padding: 4px; }
.sidebar-mini #sidebar-wrapper .header-logo { width: 56px; max-width: 100%; }
.main-sidebar .sidebar-menu li a { color: var(--acre-text); }
#sidebar-wrapper .sidebar-menu li.menu-header { color: var(--acre-muted); }
#sidebar-wrapper .sidebar-menu li > a:hover {
  color: var(--acre-action) !important;
  background: var(--acre-soft) !important;
  box-shadow: inset 3px 0 var(--acre-blue);
}
#sidebar-wrapper .sidebar-menu li.active > a,
#sidebar-wrapper .sidebar-menu li.active > a:hover {
  background: var(--acre-navy) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 var(--acre-gold), 0 4px 12px #0b2d5c1a;
}
#sidebar-wrapper .sidebar-menu .dropdown-menu { background: var(--acre-soft) !important; border-left-color: var(--acre-blue); }
.section-header h1, .section-title, .card .card-header h4 { color: var(--acre-navy); }
body .btn-primary, body .btn-info, body .btn.btn-primary,
body.hrms-theme .btn-primary, body.hrms-theme .btn-info {
  background: var(--acre-action) !important;
  border-color: var(--acre-action) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px #087fea26;
}
body .btn-primary:hover, body .btn-info:hover,
body .btn-primary:active, body .btn-info:active {
  background: var(--acre-navy) !important;
  border-color: var(--acre-navy) !important;
}
body .btn-outline-primary, body .btn-outline-info {
  color: var(--acre-action) !important; border-color: var(--acre-action) !important; background: transparent !important;
}
body .btn-outline-primary:hover, body .btn-outline-info:hover {
  background: var(--acre-action) !important; color: #fff !important;
}
body .btn-warning { background: var(--acre-gold) !important; color: #0B2D5C !important; border-color: var(--acre-gold) !important; }
body .bg-primary, body .bg-info, body .badge-primary, body .badge-info {
  background: var(--acre-action) !important; color: #fff !important;
}
body .text-primary, body .text-info { color: var(--acre-action) !important; }
body .border-primary { border-color: var(--acre-blue) !important; }
.progress-bar { background-color: var(--acre-blue); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link,
.page-item.active .page-link, .pagination .page-item.active .page-link {
  background: var(--acre-action) !important; border-color: var(--acre-action) !important; color: #fff !important;
}
.nav-tabs .nav-link.active { color: var(--acre-action) !important; border-bottom-color: var(--acre-gold) !important; }
.page-link { color: var(--acre-action); }
.dropdown-item:focus, .dropdown-item:hover { background: var(--acre-soft); color: var(--acre-text); }
.dropdown-item.active, .dropdown-item:active { background: var(--acre-action); color: #fff; }
.form-control:focus, .form-select:focus, .select2-container--focus .select2-selection {
  border-color: var(--acre-blue) !important; box-shadow: 0 0 0 3px #087fea26 !important;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--acre-action); }
.custom-control-input:checked ~ .custom-control-label::before,
.form-check-input:checked { background-color: var(--acre-action); border-color: var(--acre-action); }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.daterangepicker td.active, .daterangepicker td.active:hover,
.daterangepicker .ranges li.active { background-color: var(--acre-action); color: #fff; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--acre-soft); color: var(--acre-text); border-color: var(--acre-line); }
.admin-dashboard-v2 .dashboard-hero, .cp-dashboard-v2 .cp-hero,
body.hrms-theme .hero, body.hrms-theme .hero-card,
body.hrms-theme .hr-hero, body.hrms-theme .hrms-hero {
  background: linear-gradient(115deg, #0B2D5C 15%, #0668C2 100%) !important;
  border-bottom: 3px solid var(--acre-gold) !important;
}
.main-footer { border-top: 1px solid var(--acre-line); color: var(--acre-muted); }
.main-footer a { color: var(--acre-text); }
/* The login keeps its existing authentication behavior and responsive geometry. */
body.acre-login { --gold: #FF9D00; --gold-soft: #FFD28A; background: #0B2D5C; }
.acre-login .login-scene {
  background-image: linear-gradient(110deg, #0b2d5ce6, #0b2d5c80), url('../img/login_img.png');
}
.acre-login .brand-mark { width: 100%; height: 126px; background-color: #fff; border-radius: 12px; filter: none; }
.acre-login .brand-copy h1 { color: #fff; letter-spacing: .03em; }
.acre-login .brand-line { background: linear-gradient(90deg, transparent, #FF9D00, transparent); }
.acre-login .door-login { background: #0b2d5ce8; border: 1px solid #087FEA; border-top: 3px solid #FF9D00; border-radius: 14px; backdrop-filter: blur(12px); }
.acre-login .input-shell { background: #071e3d99; }
.acre-login .input-shell:focus-within { background: #071e3dcc; border-color: #087FEA; box-shadow: 0 0 0 3px #087fea33; }
.acre-login .unlock-control { background: #071e3d; border-color: #087FEA; }
.acre-login .key-handle { background: #FF9D00; color: #0B2D5C; }
.acre-login .lock-end { background: #0B2D5C; color: #FF9D00; border-color: #FF9D00; }
html[data-theme="dark"] .section-header h1,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .card .card-header h4 { color: var(--acre-text); }
html[data-theme="dark"] body.hrms-theme .card,
html[data-theme="dark"] body.hrms-theme .cardx,
html[data-theme="dark"] body.hrms-theme .filter-card,
html[data-theme="dark"] body.hrms-theme .table-card,
html[data-theme="dark"] body.hrms-theme .stat-card,
html[data-theme="dark"] body.hrms-theme .module-tile { background: var(--acre-surface) !important; border-color: var(--acre-line) !important; }
html[data-theme="dark"] body .text-primary,
html[data-theme="dark"] body .text-info { color: #77BDFF !important; }
@media (max-width: 767px) { .acre-login .brand-mark { height: 95px; } }
@media (prefers-reduced-motion: reduce) { .acre-login .door-login { animation: none; } }
