/* ==========================================================
   WORKCORE UNIFIED THEME V2
   Visual skin only - NO layout rules
   ERP pilot
   ========================================================== */

:root {
  --wc2-bg: #f4f7fa;
  --wc2-surface: #ffffff;
  --wc2-surface-soft: #f8fafc;

  --wc2-text: #182431;
  --wc2-muted: #6b7b8a;

  --wc2-border: #dce5ec;
  --wc2-border-strong: #cbd8e2;

  --wc2-blue: #2f78b4;
  --wc2-blue-dark: #245f8f;
  --wc2-blue-soft: #edf6fc;

  --wc2-sidebar: #17324b;
  --wc2-sidebar-deep: #122a40;
  --wc2-sidebar-text: #d9e7f2;
  --wc2-sidebar-muted: #8fa8bc;
  --wc2-sidebar-active: #285f8d;

  --wc2-success: #26845e;
  --wc2-warning: #ad7a25;
  --wc2-danger: #b94a4a;
  --wc2-danger-soft: #fff1f1;

  --wc2-radius-sm: 9px;
  --wc2-radius: 12px;
  --wc2-radius-lg: 16px;

  --wc2-shadow:
    0 5px 18px rgba(31, 55, 76, .055);

  --wc2-shadow-hover:
    0 9px 24px rgba(31, 55, 76, .09);
}


/* ==========================================================
   LIGHT BASE
   ========================================================== */

html:not([data-theme="dark"]) {
  background: var(--wc2-bg);
}

html:not([data-theme="dark"]) body {
  background:
    radial-gradient(
      circle at 82% -12%,
      rgba(40,118,168,.07),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      #f8fafc 0,
      var(--wc2-bg) 360px
    );
  color: var(--wc2-text);
}


/* ==========================================================
   SIDEBAR - COLOR ONLY
   ========================================================== */

html:not([data-theme="dark"]) .sidebar {
  background:
    linear-gradient(
      180deg,
      var(--wc2-sidebar) 0%,
      var(--wc2-sidebar-deep) 100%
    );

  color: #fff;

  box-shadow:
    5px 0 20px rgba(15, 36, 53, .10);
}

html:not([data-theme="dark"]) .brand {
  border-bottom-color:
    rgba(255,255,255,.08);
}

html:not([data-theme="dark"]) .brand-mark {
  background:
    linear-gradient(
      145deg,
      #4c91c8,
      #2f72a7
    );

  box-shadow:
    0 3px 0 rgba(10,48,78,.55),
    0 6px 12px rgba(0,0,0,.16);
}

html:not([data-theme="dark"]) .brand-title {
  color: #fff;
}

html:not([data-theme="dark"]) .brand-subtitle,
html:not([data-theme="dark"]) .nav-section,
html:not([data-theme="dark"]) .sidebar-footer {
  color: var(--wc2-sidebar-muted);
}

html:not([data-theme="dark"]) .nav-item {
  color: var(--wc2-sidebar-text);
  background: transparent;
}

html:not([data-theme="dark"]) .nav-item:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}

html:not([data-theme="dark"]) .nav-item.active {
  color: #fff;
  background: var(--wc2-sidebar-active);

  box-shadow:
    inset 3px 0 0 #74b5e4,
    0 3px 9px rgba(0,0,0,.12);
}


/* ==========================================================
   TOPBAR
   ========================================================== */

html:not([data-theme="dark"]) .topbar {
  background: rgba(255,255,255,.97);
  border-bottom-color: var(--wc2-border);
}

html:not([data-theme="dark"]) .page-title {
  color: var(--wc2-text);
}

html:not([data-theme="dark"]) .breadcrumb,
html:not([data-theme="dark"]) .user-role {
  color: var(--wc2-muted);
}

html:not([data-theme="dark"]) .icon-button,
html:not([data-theme="dark"]) .logout-button {
  background: #fff;
  color: #365c78;
  border-color: var(--wc2-border);
  border-radius: var(--wc2-radius-sm);

  box-shadow:
    0 2px 6px rgba(31,55,76,.04);
}

html:not([data-theme="dark"]) .icon-button:hover,
html:not([data-theme="dark"]) .logout-button:hover {
  background: var(--wc2-blue-soft);
  border-color: #bad5e8;
}


/* ==========================================================
   HERO
   ========================================================== */

html:not([data-theme="dark"]) .hero {
  background:
    linear-gradient(
      105deg,
      #ffffff 0%,
      #fbfdff 100%
    );

  border-color: var(--wc2-border);
  border-radius: var(--wc2-radius-lg);

  box-shadow: var(--wc2-shadow);
}

html:not([data-theme="dark"]) .hero h1 {
  color: var(--wc2-text);
}

html:not([data-theme="dark"]) .hero p {
  color: var(--wc2-muted);
}

html:not([data-theme="dark"]) .hero-badge {
  background: var(--wc2-blue-soft);
  border-color: #cfe2ef;
  border-radius: var(--wc2-radius-sm);
}

html:not([data-theme="dark"]) .hero-badge strong {
  color: var(--wc2-blue-dark);
}

html:not([data-theme="dark"]) .hero-badge span {
  color: var(--wc2-muted);
}


/* ==========================================================
   REMOVE DECORATIVE ACCENTS
   ========================================================== */

html:not([data-theme="dark"]) .hero::before,
html:not([data-theme="dark"]) .hero::after,
html:not([data-theme="dark"]) .section-heading h2::before,
html:not([data-theme="dark"]) .section-heading h2::after,
html:not([data-theme="dark"]) .panel::before,
html:not([data-theme="dark"]) .panel::after,
html:not([data-theme="dark"]) .table-panel::before,
html:not([data-theme="dark"]) .table-panel::after,
html:not([data-theme="dark"]) .module-card::before,
html:not([data-theme="dark"]) .module-card::after {
  content: none !important;
}

html:not([data-theme="dark"]) .section-heading h2 {
  color: var(--wc2-text);
}

html:not([data-theme="dark"]) .section-heading span {
  color: var(--wc2-muted);
}


/* ==========================================================
   CARDS / PANELS
   ========================================================== */

html:not([data-theme="dark"]) .module-card,
html:not([data-theme="dark"]) .panel,
html:not([data-theme="dark"]) .table-panel {
  background: var(--wc2-surface);
  border-color: var(--wc2-border);
  border-radius: var(--wc2-radius);

  box-shadow: var(--wc2-shadow);
}

html:not([data-theme="dark"]) .module-card {
  overflow: hidden;
}

html:not([data-theme="dark"]) .module-card.available:hover {
  border-color: #bfd5e5;
  box-shadow: var(--wc2-shadow-hover);
}

html:not([data-theme="dark"]) .module-card h3,
html:not([data-theme="dark"]) .panel-title {
  color: var(--wc2-text);
}

html:not([data-theme="dark"]) .module-card p,
html:not([data-theme="dark"]) .system-detail {
  color: var(--wc2-muted);
}

html:not([data-theme="dark"]) .module-icon {
  color: var(--wc2-blue);
  background: var(--wc2-blue-soft);
  border-color: #d3e5f1;
  border-radius: var(--wc2-radius-sm);
}

html:not([data-theme="dark"]) .system-row {
  background: var(--wc2-surface-soft);
  border-color: var(--wc2-border);
  border-radius: var(--wc2-radius-sm);
}

html:not([data-theme="dark"]) .system-name {
  color: var(--wc2-text);
}


/* ==========================================================
   INPUTS
   ========================================================== */

html:not([data-theme="dark"]) input,
html:not([data-theme="dark"]) select,
html:not([data-theme="dark"]) textarea {
  background: #fff;
  color: var(--wc2-text);
  border-color: var(--wc2-border-strong);
  border-radius: var(--wc2-radius-sm);
}

html:not([data-theme="dark"]) input:focus,
html:not([data-theme="dark"]) select:focus,
html:not([data-theme="dark"]) textarea:focus {
  outline: none;
  border-color: #7fb0d5;

  box-shadow:
    0 0 0 3px rgba(47,120,180,.11);
}


/* ==========================================================
   TABLES
   ========================================================== */

html:not([data-theme="dark"]) table {
  color: var(--wc2-text);
}

html:not([data-theme="dark"]) th {
  background: var(--wc2-surface-soft);
  color: #506272;
  border-color: var(--wc2-border);
}

html:not([data-theme="dark"]) td {
  border-color: var(--wc2-border);
}

html:not([data-theme="dark"]) tbody tr:hover {
  background: #f8fbfd;
}


/* ==========================================================
   AUTH
   ========================================================== */

html:not([data-theme="dark"]) .auth-shell {
  background: var(--wc2-bg);
}

html:not([data-theme="dark"]) .auth-card {
  background: #fff;
  border-color: var(--wc2-border);
  border-radius: var(--wc2-radius-lg);

  box-shadow:
    0 14px 36px rgba(31,55,76,.10);
}

html:not([data-theme="dark"]) .auth-brand-title {
  color: var(--wc2-text);
}

html:not([data-theme="dark"]) .auth-brand-subtitle {
  color: var(--wc2-muted);
}


/* ==========================================================
   ERP MODALS
   ========================================================== */

html:not([data-theme="dark"]) #authAdminOverlay,
html:not([data-theme="dark"]) #userAdminOverlay,
html:not([data-theme="dark"]) #roleAdminOverlay,
html:not([data-theme="dark"]) #cncDashboardReportOverlay,
html:not([data-theme="dark"]) #cncDashboardOverlay,
html:not([data-theme="dark"]) #cncReportOverlay,
html:not([data-theme="dark"]) #dashboardReportOverlay {
  color: var(--wc2-text);
}

html:not([data-theme="dark"]) #authAdminOverlay input,
html:not([data-theme="dark"]) #authAdminOverlay select,
html:not([data-theme="dark"]) #authAdminOverlay textarea,
html:not([data-theme="dark"]) #userAdminOverlay input,
html:not([data-theme="dark"]) #userAdminOverlay select,
html:not([data-theme="dark"]) #userAdminOverlay textarea,
html:not([data-theme="dark"]) #roleAdminOverlay input,
html:not([data-theme="dark"]) #roleAdminOverlay select,
html:not([data-theme="dark"]) #roleAdminOverlay textarea,
html:not([data-theme="dark"]) #cncDashboardReportOverlay input,
html:not([data-theme="dark"]) #cncDashboardReportOverlay select,
html:not([data-theme="dark"]) #cncDashboardReportOverlay textarea {
  background: #fff !important;
  color: var(--wc2-text) !important;
  border-color: var(--wc2-border-strong) !important;
}


/* ==========================================================
   BUTTON MOTION STANDARD
   Applies to light + dark.
   Color remains theme/module specific.
   ========================================================== */

button:not(.nav-item),
.btn,
.auth-submit,
.icon-button,
.logout-button {
  transform: none !important;

  transition:
    transform .16s ease,
    box-shadow .16s ease,
    border-color .16s ease,
    background-color .16s ease,
    color .16s ease !important;
}

button:not(.nav-item):hover,
.btn:hover,
.auth-submit:hover,
.icon-button:hover,
.logout-button:hover {
  transform: translateY(-1px) !important;
}

button:not(.nav-item):active,
.btn:active,
.auth-submit:active,
.icon-button:active,
.logout-button:active {
  transform:
    translateY(0) scale(.985) !important;
}


/* ==========================================================
   LIGHT BUTTON SKIN
   ========================================================== */

html:not([data-theme="dark"]) .btn.primary,
html:not([data-theme="dark"]) button.primary,
html:not([data-theme="dark"]) .auth-submit {
  background:
    linear-gradient(
      135deg,
      #3d8cc4 0%,
      #2d70a4 100%
    ) !important;

  color: #fff !important;
  border-color: #2d70a4 !important;

  box-shadow:
    0 6px 14px rgba(45,112,164,.17) !important;
}

html:not([data-theme="dark"]) .btn.danger,
html:not([data-theme="dark"]) button.danger {
  background: var(--wc2-danger-soft) !important;
  color: var(--wc2-danger) !important;
  border-color: #edbcbc !important;
  box-shadow: none !important;
}


/* ==========================================================
   STATUS
   ========================================================== */

html:not([data-theme="dark"]) .status.live {
  color: var(--wc2-success);
}

html:not([data-theme="dark"]) .status.live .dot {
  background: var(--wc2-success);
}


/* ==========================================================
   WORKCORE THEME V2
   ERP MODAL / CNC REPORT HARMONIZATION
   ========================================================== */


/* ---------- CNC REPORT SURFACES ---------- */

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-kpi {
  background: var(--wc2-surface-soft) !important;
  border-color: var(--wc2-border) !important;
  border-radius: var(--wc2-radius) !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-kpi-label {
  color: var(--wc2-muted) !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-kpi-value {
  color: var(--wc2-text) !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-kpi-sub {
  color: var(--wc2-muted) !important;
}


/* ---------- CNC REPORT BODY ---------- */

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-body {
  background: var(--wc2-surface) !important;
  border-color: var(--wc2-border) !important;
  border-radius: var(--wc2-radius) !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-empty,
html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-loading {
  color: var(--wc2-muted) !important;
}


/* ---------- CNC REPORT INPUTS ---------- */

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-field input,
html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-field select {
  background: var(--wc2-surface) !important;
  color: var(--wc2-text) !important;
  border-color: var(--wc2-border-strong) !important;
  border-radius: var(--wc2-radius-sm) !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-field input:focus,
html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-field select:focus {
  border-color: #7fb0d5 !important;
  box-shadow:
    0 0 0 3px rgba(47,120,180,.11) !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-field label {
  color: var(--wc2-muted) !important;
}


/* ---------- CNC REPORT BUTTON ---------- */

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-button {
  background: var(--wc2-surface) !important;
  color: var(--wc2-text) !important;
  border-color: var(--wc2-border-strong) !important;
  border-radius: var(--wc2-radius-sm) !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-button:hover {
  background: var(--wc2-blue-soft) !important;
  border-color: #bad5e8 !important;
}


/* ---------- CNC REPORT TABS ---------- */

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-tabs {
  background: var(--wc2-surface-soft) !important;
  border-color: var(--wc2-border) !important;
  border-radius: var(--wc2-radius-sm) !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-tab {
  background: transparent !important;
  color: var(--wc2-muted) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-tab:hover {
  background: var(--wc2-blue-soft) !important;
  color: var(--wc2-blue-dark) !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-tab.active {
  background: var(--wc2-surface) !important;
  color: var(--wc2-blue-dark) !important;
  border-color: var(--wc2-border) !important;

  box-shadow:
    0 2px 6px rgba(31,55,76,.06) !important;
}


/* ---------- CNC REPORT SCOPE ---------- */

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-scope {
  background: var(--wc2-surface-soft) !important;
  border-color: var(--wc2-border) !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-scope-label {
  color: var(--wc2-muted) !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-scope-button {
  background: var(--wc2-surface) !important;
  color: var(--wc2-text) !important;
  border-color: var(--wc2-border) !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-scope-button.active {
  background: var(--wc2-blue-soft) !important;
  color: var(--wc2-blue-dark) !important;
  border-color: #bad5e8 !important;
}


/* ---------- CNC REPORT TABLE ---------- */

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-table th {
  background: var(--wc2-surface-soft) !important;
  color: #506272 !important;
  border-color: var(--wc2-border) !important;
}

html:not([data-theme="dark"]) #cncDashboardReportOverlay .cnc-report-table td {
  background: var(--wc2-surface) !important;
  color: var(--wc2-text) !important;
  border-color: var(--wc2-border) !important;
}


/* ---------- MODAL CLOSE STANDARD ---------- */

#authAdminOverlay .wc-modal-close,
#userAdminOverlay .wc-modal-close,
#roleAdminOverlay .wc-modal-close,
#cncDashboardReportOverlay .wc-modal-close,
#cncDashboardOverlay .wc-modal-close,
#cncReportOverlay .wc-modal-close,
#dashboardReportOverlay .wc-modal-close {
  transform: none !important;
}

#authAdminOverlay .wc-modal-close:hover,
#userAdminOverlay .wc-modal-close:hover,
#roleAdminOverlay .wc-modal-close:hover,
#cncDashboardReportOverlay .wc-modal-close:hover,
#cncDashboardOverlay .wc-modal-close:hover,
#cncReportOverlay .wc-modal-close:hover,
#dashboardReportOverlay .wc-modal-close:hover {
  transform: translateY(-1px) !important;
}

#authAdminOverlay .wc-modal-close:active,
#userAdminOverlay .wc-modal-close:active,
#roleAdminOverlay .wc-modal-close:active,
#cncDashboardReportOverlay .wc-modal-close:active,
#cncDashboardOverlay .wc-modal-close:active,
#cncReportOverlay .wc-modal-close:active,
#dashboardReportOverlay .wc-modal-close:active {
  transform: translateY(0) scale(.985) !important;
}


/* ---------- BROWSER AUTOFILL ---------- */

html:not([data-theme="dark"]) input:-webkit-autofill,
html:not([data-theme="dark"]) input:-webkit-autofill:hover,
html:not([data-theme="dark"]) input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--wc2-text) !important;
  -webkit-box-shadow:
    0 0 0 1000px var(--wc2-surface) inset !important;
  box-shadow:
    0 0 0 1000px var(--wc2-surface) inset !important;
  border-color: var(--wc2-border-strong) !important;
}


/* ==========================================================
   END ERP MODAL / CNC REPORT HARMONIZATION
   ========================================================== */

/* WORKCORE V2 - ACTIVE TAB EMPHASIS */

html:not([data-theme="dark"])
#cncDashboardReportOverlay .cnc-report-tab.active {
  background: var(--wc2-blue-soft) !important;
  color: var(--wc2-blue-dark) !important;
  border-color: #a9cde5 !important;
  box-shadow:
    0 2px 6px rgba(47,120,180,.08) !important;
  font-weight: 700 !important;
}

/* ============================================================
   WORKCORE THEME V2 - ERP DARK MODAL HARMONIZATION
   Visual override only. No layout / DOM / JS.
   ============================================================ */

html[data-theme="dark"]{
  --wc2-dark-surface:#303b46;
  --wc2-dark-surface-2:#26313c;
  --wc2-dark-surface-3:#34404d;
  --wc2-dark-hover:#3b4754;
  --wc2-dark-border:#465361;
  --wc2-dark-border-strong:#526171;
  --wc2-dark-text:#edf3f6;
  --wc2-dark-text-2:#dce4ec;
  --wc2-dark-muted:#93a5b3;
  --wc2-dark-blue:#63a5dd;
}

/* Modal surfaces */

html[data-theme="dark"] #authAdminOverlay > *,
html[data-theme="dark"] #userAdminOverlay > *,
html[data-theme="dark"] #roleAdminOverlay > *,
html[data-theme="dark"] #cncDashboardReportOverlay > *,
html[data-theme="dark"] #cncDashboardOverlay > *,
html[data-theme="dark"] #cncReportOverlay > *,
html[data-theme="dark"] #dashboardReportOverlay > *{
  background:var(--wc2-dark-surface) !important;
  border-color:var(--wc2-dark-border) !important;
  color:var(--wc2-dark-text-2) !important;
  box-shadow:
    0 28px 90px rgba(0,0,0,.46),
    0 4px 14px rgba(0,0,0,.22) !important;
}

/* Headings / muted text */

html[data-theme="dark"] #authAdminOverlay h1,
html[data-theme="dark"] #authAdminOverlay h2,
html[data-theme="dark"] #authAdminOverlay h3,
html[data-theme="dark"] #userAdminOverlay h1,
html[data-theme="dark"] #userAdminOverlay h2,
html[data-theme="dark"] #userAdminOverlay h3,
html[data-theme="dark"] #roleAdminOverlay h1,
html[data-theme="dark"] #roleAdminOverlay h2,
html[data-theme="dark"] #roleAdminOverlay h3,
html[data-theme="dark"] #cncDashboardReportOverlay h1,
html[data-theme="dark"] #cncDashboardReportOverlay h2,
html[data-theme="dark"] #cncDashboardReportOverlay h3{
  color:var(--wc2-dark-text) !important;
}

html[data-theme="dark"] #userAdminOverlay .breadcrumb,
html[data-theme="dark"] #roleAdminOverlay .breadcrumb,
html[data-theme="dark"] #cncDashboardReportOverlay .breadcrumb,
html[data-theme="dark"] #roleAdminOverlay .role-empty{
  color:var(--wc2-dark-muted) !important;
}

/* Inputs / selects / textarea */

html[data-theme="dark"] #authAdminOverlay input,
html[data-theme="dark"] #authAdminOverlay select,
html[data-theme="dark"] #authAdminOverlay textarea,
html[data-theme="dark"] #userAdminOverlay input,
html[data-theme="dark"] #userAdminOverlay select,
html[data-theme="dark"] #userAdminOverlay textarea,
html[data-theme="dark"] #roleAdminOverlay input,
html[data-theme="dark"] #roleAdminOverlay select,
html[data-theme="dark"] #roleAdminOverlay textarea,
html[data-theme="dark"] #cncDashboardReportOverlay input,
html[data-theme="dark"] #cncDashboardReportOverlay select,
html[data-theme="dark"] #cncDashboardReportOverlay textarea{
  background:var(--wc2-dark-surface-2) !important;
  color:var(--wc2-dark-text) !important;
  border-color:var(--wc2-dark-border) !important;
  box-shadow:none !important;
}

html[data-theme="dark"] #authAdminOverlay input::placeholder,
html[data-theme="dark"] #authAdminOverlay textarea::placeholder,
html[data-theme="dark"] #userAdminOverlay input::placeholder,
html[data-theme="dark"] #userAdminOverlay textarea::placeholder,
html[data-theme="dark"] #roleAdminOverlay input::placeholder,
html[data-theme="dark"] #roleAdminOverlay textarea::placeholder,
html[data-theme="dark"] #cncDashboardReportOverlay input::placeholder{
  color:#7f919f !important;
}

html[data-theme="dark"] #authAdminOverlay input:focus,
html[data-theme="dark"] #authAdminOverlay select:focus,
html[data-theme="dark"] #authAdminOverlay textarea:focus,
html[data-theme="dark"] #userAdminOverlay input:focus,
html[data-theme="dark"] #userAdminOverlay select:focus,
html[data-theme="dark"] #userAdminOverlay textarea:focus,
html[data-theme="dark"] #roleAdminOverlay input:focus,
html[data-theme="dark"] #roleAdminOverlay select:focus,
html[data-theme="dark"] #roleAdminOverlay textarea:focus,
html[data-theme="dark"] #cncDashboardReportOverlay input:focus,
html[data-theme="dark"] #cncDashboardReportOverlay select:focus,
html[data-theme="dark"] #cncDashboardReportOverlay textarea:focus{
  border-color:var(--wc2-dark-blue) !important;
  box-shadow:0 0 0 4px rgba(99,165,221,.12) !important;
}

/* Browser autofill */

html[data-theme="dark"] #authAdminOverlay input:-webkit-autofill,
html[data-theme="dark"] #authAdminOverlay input:-webkit-autofill:hover,
html[data-theme="dark"] #authAdminOverlay input:-webkit-autofill:focus,
html[data-theme="dark"] #userAdminOverlay input:-webkit-autofill,
html[data-theme="dark"] #userAdminOverlay input:-webkit-autofill:hover,
html[data-theme="dark"] #userAdminOverlay input:-webkit-autofill:focus{
  -webkit-text-fill-color:var(--wc2-dark-text) !important;
  -webkit-box-shadow:0 0 0 1000px var(--wc2-dark-surface-2) inset !important;
  box-shadow:0 0 0 1000px var(--wc2-dark-surface-2) inset !important;
  caret-color:var(--wc2-dark-text) !important;
}

/* Native select options */

html[data-theme="dark"] #userAdminOverlay select option,
html[data-theme="dark"] #roleAdminOverlay select option,
html[data-theme="dark"] #cncDashboardReportOverlay select option{
  background:var(--wc2-dark-surface-2) !important;
  color:var(--wc2-dark-text) !important;
}

/* Neutral buttons */

html[data-theme="dark"] #authAdminOverlay button:not(.primary):not(.danger),
html[data-theme="dark"] #userAdminOverlay button:not(.primary):not(.danger),
html[data-theme="dark"] #roleAdminOverlay button:not(.primary):not(.danger),
html[data-theme="dark"] #cncDashboardReportOverlay button:not(.primary):not(.danger){
  background:var(--wc2-dark-surface) !important;
  color:var(--wc2-dark-text-2) !important;
  border-color:var(--wc2-dark-border-strong) !important;
  box-shadow:none !important;
}

html[data-theme="dark"] #authAdminOverlay button:not(.primary):not(.danger):hover,
html[data-theme="dark"] #userAdminOverlay button:not(.primary):not(.danger):hover,
html[data-theme="dark"] #roleAdminOverlay button:not(.primary):not(.danger):hover,
html[data-theme="dark"] #cncDashboardReportOverlay button:not(.primary):not(.danger):hover{
  background:var(--wc2-dark-hover) !important;
  color:var(--wc2-dark-text) !important;
}

/* Close buttons */

html[data-theme="dark"] #authAdminOverlay .wc-modal-close,
html[data-theme="dark"] #userAdminOverlay .wc-modal-close,
html[data-theme="dark"] #roleAdminOverlay .wc-modal-close,
html[data-theme="dark"] #cncDashboardReportOverlay .wc-modal-close{
  background:var(--wc2-dark-surface) !important;
  color:var(--wc2-dark-text-2) !important;
  border-color:var(--wc2-dark-border-strong) !important;
  box-shadow:none !important;
}

/* Role admin */

html[data-theme="dark"] #roleAdminOverlay .role-list-panel{
  background:var(--wc2-dark-surface-2) !important;
  border-color:var(--wc2-dark-border) !important;
}

html[data-theme="dark"] #roleAdminOverlay .role-editor{
  background:var(--wc2-dark-surface) !important;
  color:var(--wc2-dark-text-2) !important;
}

html[data-theme="dark"] #roleAdminOverlay #roleList > *,
html[data-theme="dark"] #roleAdminOverlay [data-role-code]{
  background:var(--wc2-dark-surface) !important;
  color:var(--wc2-dark-text-2) !important;
  border-color:var(--wc2-dark-border) !important;
}

html[data-theme="dark"] #roleAdminOverlay #roleList > *:hover,
html[data-theme="dark"] #roleAdminOverlay [data-role-code]:hover{
  background:var(--wc2-dark-hover) !important;
}

html[data-theme="dark"] #roleAdminOverlay #roleList > *.active,
html[data-theme="dark"] #roleAdminOverlay [data-role-code].active{
  background:#263947 !important;
  border-color:#4c7b99 !important;
}

html[data-theme="dark"] #roleAdminOverlay .role-code{
  color:var(--wc2-dark-text) !important;
}

html[data-theme="dark"] #roleAdminOverlay .role-name{
  color:var(--wc2-dark-muted) !important;
}

html[data-theme="dark"] #roleAdminOverlay .role-badge{
  background:var(--wc2-dark-surface-3) !important;
  color:#aebbc6 !important;
}

/* User table */

html[data-theme="dark"] #userAdminOverlay .admin-table{
  color:var(--wc2-dark-text-2) !important;
}

html[data-theme="dark"] #userAdminOverlay .admin-table th{
  background:var(--wc2-dark-surface-3) !important;
  color:#b9c8d4 !important;
  border-color:var(--wc2-dark-border) !important;
}

html[data-theme="dark"] #userAdminOverlay .admin-table td{
  color:var(--wc2-dark-text-2) !important;
  border-color:#3b4754 !important;
}

html[data-theme="dark"] #userAdminOverlay .admin-table tbody tr:hover td{
  background:var(--wc2-dark-surface-3) !important;
}

/* CNC read-only report */

html[data-theme="dark"] #cncDashboardReportOverlay .cnc-report-window,
html[data-theme="dark"] #cncDashboardReportOverlay .cnc-report-body{
  background:var(--wc2-dark-surface) !important;
  color:var(--wc2-dark-text-2) !important;
}

html[data-theme="dark"] #cncDashboardReportOverlay .cnc-report-kpi,
html[data-theme="dark"] #cncDashboardReportOverlay .summary-card{
  background:var(--wc2-dark-surface-3) !important;
  color:var(--wc2-dark-text-2) !important;
  border-color:var(--wc2-dark-border) !important;
}

html[data-theme="dark"] #cncDashboardReportOverlay .cnc-report-tabs{
  background:var(--wc2-dark-surface-2) !important;
  border-color:var(--wc2-dark-border) !important;
}

html[data-theme="dark"] #cncDashboardReportOverlay .cnc-report-tab{
  background:transparent !important;
  color:var(--wc2-dark-muted) !important;
  border-color:transparent !important;
}

html[data-theme="dark"] #cncDashboardReportOverlay .cnc-report-tab.active{
  background:#263947 !important;
  color:#8fc5e7 !important;
  border-color:#4c7b99 !important;
}

html[data-theme="dark"] #cncDashboardReportOverlay table th{
  background:var(--wc2-dark-surface-3) !important;
  color:#b9c8d4 !important;
  border-color:var(--wc2-dark-border) !important;
}

html[data-theme="dark"] #cncDashboardReportOverlay table td{
  color:var(--wc2-dark-text-2) !important;
  border-color:#3b4754 !important;
}

/* END WORKCORE THEME V2 - ERP DARK MODAL HARMONIZATION */

/* WORKCORE V2 - ERP ROLE PERMISSION CHECKBOX NORMALIZATION */

#roleAdminOverlay input[type="checkbox"]{
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  min-height:20px !important;
  max-width:20px !important;
  max-height:20px !important;
  padding:0 !important;
  margin:0 !important;
  box-shadow:none !important;
  accent-color:#2f9ed8;
}

/* END ERP ROLE PERMISSION CHECKBOX NORMALIZATION */

/* ==========================================================
   WORKCORE V2 - LEGACY CONTENT ACCENT NEUTRALIZATION
   ========================================================== */

.panel::before,
.panel::after,
.table-panel::before,
.table-panel::after,
.kpi::before,
.kpi::after,
.detail-card::before,
.detail-card::after,
.left-accent::before,
.left-accent::after,
.panel-accent::before,
.panel-accent::after,
.section-accent::before,
.section-accent::after,
.card-accent::before,
.card-accent::after,
.top-accent::before,
.top-accent::after,
.hero::before,
.hero::after,
.section-heading h2::before,
.section-heading h2::after,
.metric-card::before,
.metric-card::after,
.stat-card::before,
.stat-card::after,
.summary-card::before,
.summary-card::after,
.kpi-card::before,
.kpi-card::after,
.report-card::before,
.report-card::after,
.dashboard-card::before,
.dashboard-card::after,
.info-card::before,
.info-card::after {
  content:none !important;
  display:none !important;
}

.panel,
.table-panel,
.kpi,
.detail-card,
.left-accent,
.panel-accent,
.section-accent,
.card-accent,
.top-accent {
  border-left-color:var(--border, #d7e3ed) !important;
  border-top-color:var(--border, #d7e3ed) !important;
}

/* ==========================================================
   WORKCORE V2 - CLOSE VISUAL + SHIMMER
   Motion is handled by BUTTON MOTION STANDARD.
   ========================================================== */

button[id^="close"],
button[id*="close"],
button[id*="Close"],
button.workcore-close-btn,
button.competency-eval-close,
button[class*="modal-close"],
button[class*="report-close"],
button[aria-label*="Bezár"],
button[title*="Bezár"] {
  position:relative;
  overflow:hidden;
}

/* LIGHT */

html:not([data-theme="dark"]) button[id^="close"],
html:not([data-theme="dark"]) button[id*="close"],
html:not([data-theme="dark"]) button[id*="Close"],
html:not([data-theme="dark"]) button.workcore-close-btn,
html:not([data-theme="dark"]) button.competency-eval-close,
html:not([data-theme="dark"]) button[class*="modal-close"],
html:not([data-theme="dark"]) button[class*="report-close"],
html:not([data-theme="dark"]) button[aria-label*="Bezár"],
html:not([data-theme="dark"]) button[title*="Bezár"] {
  background:linear-gradient(180deg,#fff 0%,#f6f9fc 100%) !important;
  color:#41576c !important;
  border:1px solid #cbd9e6 !important;
  box-shadow:0 4px 11px rgba(25,55,85,.08) !important;
}

/* DARK */

html[data-theme="dark"] button[id^="close"],
html[data-theme="dark"] button[id*="close"],
html[data-theme="dark"] button[id*="Close"],
html[data-theme="dark"] button.workcore-close-btn,
html[data-theme="dark"] button.competency-eval-close,
html[data-theme="dark"] button[class*="modal-close"],
html[data-theme="dark"] button[class*="report-close"],
html[data-theme="dark"] button[aria-label*="Bezár"],
html[data-theme="dark"] button[title*="Bezár"] {
  background:linear-gradient(180deg,#34414d 0%,#2a3540 100%) !important;
  color:#dce8f2 !important;
  border:1px solid #4b6073 !important;
  box-shadow:0 5px 13px rgba(0,0,0,.24) !important;
}

/* SHIMMER */

button[id^="close"]::before,
button[id*="close"]::before,
button[id*="Close"]::before,
button.workcore-close-btn::before,
button.competency-eval-close::before,
button[class*="modal-close"]::before,
button[class*="report-close"]::before,
button[aria-label*="Bezár"]::before,
button[title*="Bezár"]::before {
  content:"" !important;
  display:block !important;
  position:absolute !important;
  top:-35% !important;
  bottom:-35% !important;
  left:-55% !important;
  width:34% !important;
  background:linear-gradient(
    115deg,
    transparent 0%,
    rgba(255,255,255,.06) 25%,
    rgba(255,255,255,.28) 50%,
    rgba(255,255,255,.06) 75%,
    transparent 100%
  ) !important;
  transform:translateX(-220%) skewX(-14deg) !important;
  transition:transform .48s cubic-bezier(.2,.7,.25,1) !important;
  pointer-events:none !important;
}

button[id^="close"]:hover::before,
button[id*="close"]:hover::before,
button[id*="Close"]:hover::before,
button.workcore-close-btn:hover::before,
button.competency-eval-close:hover::before,
button[class*="modal-close"]:hover::before,
button[class*="report-close"]:hover::before,
button[aria-label*="Bezár"]:hover::before,
button[title*="Bezár"]:hover::before {
  transform:translateX(650%) skewX(-14deg) !important;
}

@media (prefers-reduced-motion: reduce) {
  button[id^="close"]::before,
  button[id*="close"]::before,
  button[id*="Close"]::before,
  button.workcore-close-btn::before,
  button.competency-eval-close::before,
  button[class*="modal-close"]::before,
  button[class*="report-close"]::before,
  button[aria-label*="Bezár"]::before,
  button[title*="Bezár"]::before {
    display:none !important;
  }
}



/* WORKCORE DARK HERO CONCAVE V1 */
html[data-theme="dark"] .hero .hero-badge {
  position: relative;
  isolation: isolate;
}

html[data-theme="dark"] .hero .hero-badge::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 380px;
  height: 240px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse at 48% 42%,
      rgba(8,15,23,.52) 0%,
      rgba(10,18,27,.40) 24%,
      rgba(14,23,32,.24) 48%,
      rgba(20,30,40,.10) 70%,
      rgba(20,30,40,0) 100%
    );
}
/* END WORKCORE DARK HERO CONCAVE V1 */
