/* SubliSign ERP | stronger table and panel contrast | 2026-11-05
   Visual only: keep row heights, icons, layout, data and form calculations unchanged. */
@media screen {
  :root { --sp-strong-table-line: color-mix(in srgb, var(--cj-theme-border, #bbcbd7) 76%, currentColor 24%); }

  /* Readable labels and compact tables; icons are deliberately excluded. */
  .MuiTableCell-root,
  .MuiDataGrid-cell,
  .rdt_TableCell,
  main.content table td,
  .sp-module-workspace table td {
    font-weight: 550 !important;
    font-size: max(12px, 0.79rem) !important;
    line-height: 1.45;
  }
  .MuiTableHead-root .MuiTableCell-root,
  .MuiDataGrid-columnHeaderTitle,
  .rdt_TableCol,
  main.content table th,
  .sp-module-workspace table th {
    font-weight: 700 !important;
    font-size: max(12px, 0.79rem) !important;
    letter-spacing: .01em;
  }
  .MuiTypography-subtitle1,
  .MuiTypography-subtitle2,
  .MuiFormLabel-root,
  .MuiInputLabel-root,
  .sp-module-workspace h2,
  .sp-module-workspace h3,
  .sp-page-heading h2,
  .page-modal-titlebar,
  .sp-box-group h3 {
    font-weight: 700 !important;
  }
  .MuiButton-root,
  .sp-box-grid a,
  .sp-operation-grid button,
  .sp-module-groups button,
  .MuiTab-root {
    font-weight: 650 !important;
  }

  /* A clearer outline, not a heavy dark grid. */
  .MuiTableContainer-root,
  .MuiDataGrid-root,
  .rdt_Table,
  main.content .table-responsive,
  .sp-module-workspace .table-responsive,
  .sp-box-group,
  .sp-box-grid a,
  .sp-module-workspace,
  .MuiCard-root,
  .MuiPaper-root:not(.MuiAppBar-root):not(.MuiDialog-paper):not(.MuiPopover-paper):not(.MuiMenu-paper) {
    border-color: var(--sp-strong-table-line) !important;
    border-width: 1.35px !important;
  }
  .MuiTableCell-root,
  .MuiDataGrid-cell,
  .rdt_TableCell,
  main.content table th,
  main.content table td,
  .sp-module-workspace table th,
  .sp-module-workspace table td {
    border-bottom-color: var(--sp-strong-table-line) !important;
  }
  .MuiOutlinedInput-notchedOutline {
    border-color: var(--sp-strong-table-line) !important;
    border-width: 1.25px !important;
  }
}
@media screen and (max-width: 600px) {
  .MuiTableCell-root, .MuiDataGrid-cell, main.content table td,
  .sp-module-workspace table td {font-size: 12px !important;}
}

/* Sublisign requested typography and hover pass — stronger but readable. */
@media screen {
  #root, #root main.content, #root .sp-module-workspace, #root .cj-native-addon {
    font-weight: 650;
  }
  #root :is(.MuiTypography-root,.MuiTableCell-root,.MuiDataGrid-cell,.MuiDataGrid-cellContent,.rdt_TableCell,.MuiFormLabel-root,.MuiInputLabel-root,.MuiInputBase-input,.MuiSelect-select,.MuiChip-label,.MuiListItemText-primary,.MuiListItemText-secondary,.MuiMenuItem-root,.MuiButton-root,.MuiTab-root,.MuiAlert-message),
  #root main.content :is(p,td,li,label,input,textarea,select),
  #root .sp-module-workspace :is(p,td,li,label,input,textarea,select),
  #root .cj-native-addon :is(p,td,li,label,input,textarea,select),
  #root .sp-box-grid a,
  #root .sp-operation-grid button,
  #root .sp-module-groups button {
    font-weight: 650 !important;
  }
  #root :is(h1,h2,h3,h4,h5,h6,strong,b,.MuiTableHead-root .MuiTableCell-root,.MuiDataGrid-columnHeaderTitle,.rdt_TableCol,.sp-page-heading,.page-modal-titlebar),
  #root main.content :is(th,.card-title),
  #root .sp-module-workspace th {
    font-weight: 750 !important;
  }
  #root .MuiButton-root, #root .MuiTab-root,
  #root .sp-box-grid a, #root .sp-module-groups button,
  #root .sp-operation-grid button {font-weight: 700 !important;}

  /* Stronger panel and input outlines, preserving current theme colors. */
  #root :is(.MuiTableContainer-root,.MuiDataGrid-root,.MuiCard-root,.sp-module-workspace,.sp-box-group,.sp-box-grid a,.sp-operation-grid button,.sp-module-groups button,.cj-native-addon .card,.sp-kpi-card),
  #root .MuiPaper-root:not(.MuiAppBar-root):not(.MuiDialog-paper):not(.MuiMenu-paper):not(.MuiPopover-paper) {
    border-style: solid !important;
    border-width: 2px !important;
    border-color: color-mix(in srgb, var(--cj-theme-border, #a6bacb) 65%, currentColor 35%) !important;
  }
  #root :is(.MuiTableCell-root,.MuiDataGrid-cell,.rdt_TableCell),
  #root main.content :is(th,td),
  #root .sp-module-workspace :is(th,td) {
    border-bottom-width: 1.5px !important;
    border-bottom-color: color-mix(in srgb, var(--cj-theme-border, #a6bacb) 67%, currentColor 33%) !important;
  }
  #root .MuiOutlinedInput-notchedOutline {
    border-width: 1.65px !important;
    border-color: color-mix(in srgb, var(--cj-theme-border, #a6bacb) 62%, currentColor 38%) !important;
  }
}
@media screen and (hover:hover) and (pointer:fine) {
  #root :is(.MuiCard-root,.sp-kpi-card,.sp-box-grid a,.sp-module-groups button,.sp-operation-grid button,.cj-native-addon .card),
  #root .MuiPaper-root:not(.MuiAppBar-root):not(.MuiDialog-paper):not(.MuiMenu-paper):not(.MuiPopover-paper) {
    transition: border-color .15s ease,box-shadow .15s ease,background-color .15s ease,transform .15s ease !important;
  }
  #root :is(.MuiCard-root,.sp-kpi-card,.sp-box-grid a,.sp-module-groups button,.sp-operation-grid button,.cj-native-addon .card):hover,
  #root .MuiPaper-root:not(.MuiAppBar-root):not(.MuiDialog-paper):not(.MuiMenu-paper):not(.MuiPopover-paper):hover {
    border-color: var(--cj-brand-accent, #e78632) !important;
    box-shadow: 0 5px 16px #102b4e2b !important;
    transform: translateY(-1px);
  }
  #root :is(.MuiTableBody-root .MuiTableRow-root,.MuiDataGrid-row,.rdt_TableRow):hover,
  #root main.content tbody tr:hover,
  #root .sp-module-workspace tbody tr:hover {
    background-color: var(--cj-theme-hover, #e5f1f2) !important;
    box-shadow: inset 3px 0 0 var(--cj-brand-accent,#e78632);
  }
  #root :is(.MuiButton-root,.MuiTab-root,.MuiListItemButton-root):not(.Mui-disabled):hover,
  #root .sp-module-workspace button:not(:disabled):hover {
    filter: brightness(.97);
    box-shadow: 0 3px 11px #102b4e25 !important;
  }
  #root :is(.MuiOutlinedInput-root,.MuiTextField-root):hover .MuiOutlinedInput-notchedOutline {
    border-color: var(--cj-brand-accent,#e78632) !important;
  }
}
@media (prefers-reduced-motion:reduce){
  #root :is(.MuiCard-root,.sp-kpi-card,.sp-box-grid a,.sp-module-groups button,.sp-operation-grid button,.cj-native-addon .card) {
    transition: none !important;transform:none !important;
  }
}
