/* Revoo AI ID — Frontend V85 Revisi 41
   UI-only: subtle divider beneath fixed brand, nav hover/focus, consistent
   data table surfaces. All business functions, layouts, calculations,
   columns, API/Worker/Sheets and print styling remain unchanged. */
@media screen {
  /* Preserve R40's fixed, opaque logo panel and sage color. A quiet inset
     divider gives scrolling menu rows a visual boundary below the logo. */
  html:not([data-theme="dark"]) .sidebar > .sidebar-brand {
    border-bottom-color: #ccded4 !important;
    box-shadow: 0 5px 11px rgba(47, 89, 72, .055) !important;
  }
  html[data-theme="dark"] .sidebar > .sidebar-brand {
    box-shadow: 0 5px 11px rgba(0, 0, 0, .14) !important;
  }
  /* Menu styling — keep labels, order, width, and active-state semantics. */
  .sidebar-nav .sidebar-link {
    position: relative;
    transition: background-color .16s ease, color .16s ease,
                box-shadow .16s ease, transform .16s ease;
  }
  html:not([data-theme="dark"]) .sidebar-nav .sidebar-link.active {
    background: #fffefa !important;
    box-shadow: 0 4px 13px rgba(50, 83, 71, .085),
                0 1px 2px rgba(50, 83, 71, .025);
  }
  .sidebar-nav .sidebar-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: #6ba899;
    pointer-events: none;
  }
  html[data-theme="dark"] .sidebar-nav .sidebar-link.active::before {
    background: #8dc8b6;
  }
  @media (hover: hover) and (pointer: fine) {
    html:not([data-theme="dark"]) .sidebar-nav .sidebar-link:not(.active):hover {
      background: rgba(255, 255, 255, .73) !important;
      box-shadow: 0 2px 8px rgba(44, 80, 66, .045);
      transform: translateX(1px);
    }
    html:not([data-theme="dark"]) .sidebar-nav .sidebar-link:not(.active):hover .sidebar-icon {
      background: #e2f0e9;
    }
    html[data-theme="dark"] .sidebar-nav .sidebar-link:not(.active):hover {
      background: #243e43 !important;
      transform: translateX(1px);
    }
  }
  .sidebar-nav .sidebar-link:focus-visible {
    outline: 2px solid #6ba899;
    outline-offset: -2px;
  }

  /* Table harmonization. Preserve scroll, column widths, totals, status
     colors, data alignment, row height and existing sticky headers. */
  html:not([data-theme="dark"]) .page-content :is(
    .table-scroll, .table-wrap, .responsive-table, .finance-transactions-scroll
  ) {
    border-color: #dce8e1;
    box-shadow: 0 2px 9px rgba(47, 87, 73, .045);
  }
  html:not([data-theme="dark"]) .page-content table thead th {
    background-color: #eaf2ed;
    border-bottom-color: #d1e1d7;
    color: #38564e;
  }
  html:not([data-theme="dark"]) .page-content table tbody td {
    border-bottom-color: #e4ebe7;
    transition: background-color .14s ease;
  }
  html:not([data-theme="dark"]) .page-content table tbody tr:hover > td {
    background-color: #f4f9f6;
  }
  html[data-theme="dark"] .page-content table tbody tr:hover > td {
    background-color: #1c303a;
  }
  /* R34 special strong border and elevation for cash history remain. */
  @media (prefers-reduced-motion: reduce) {
    .sidebar-nav .sidebar-link,
    .page-content table tbody td { transition: none !important; }
    .sidebar-nav .sidebar-link:hover { transform: none !important; }
  }
}
