/* Glowbal UI6 — fixes post-auth view visibility and legibility of GRN data tables.
   Designed for Cloud 1.6.43 + UI1–UI5. No authentication or data logic changed. */
:root {
  --g6-text: #211b25;
  --g6-muted: #54485a;
  --g6-accent: #761548;
  --g6-row-even: #f7f0f5;
  --g6-row-odd: #ffffff;
}
/* CRITICAL: UI4 sets #login display:grid !important, which otherwise overrides
   the hidden attribute set by showApp(). The dashboard must replace login. */
html body #login[hidden], html body #app[hidden] { display: none !important; }
/* Other views must also honor hidden. No hidden form or loading component leaks. */
#app .view[hidden], #app [hidden], dialog [hidden], #login [hidden] { display: none !important; }
/* The authenticated app occupies the viewport instead of appearing beneath login. */
html body #app:not([hidden]) { min-height: 100vh; min-height: 100dvh; }
html body:has(#app:not([hidden])) { margin: 0; }
/* Reliable type hierarchy. Preserve existing section measurements and branding. */
#app .content, #app .content input, #app .content select, #app .content textarea,
#app .content button, #app .content table, #app dialog {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
}
#app .view table, #app .view th, #app .view td {
  font-size: 14px !important;
  line-height: 1.48 !important;
  letter-spacing: normal !important;
}
/* UI5 dark backgrounds + dark text made item rows almost invisible.
   Use actual light table row surfaces with dark, high-contrast text. */
#app .view .table-wrap, #app .view table { background: #fff !important; }
#app .view table tbody tr, #app .view table tbody tr:nth-child(odd) {
  background: var(--g6-row-odd) !important;
}
#app .view table tbody tr:nth-child(even) {
  background: var(--g6-row-even) !important;
}
#app .view table tbody tr:hover { background: #f0deeb !important; }
#app .view table tbody td, #app .view table tbody td:not(.ok):not(.bad) {
  color: var(--g6-text) !important;
  background: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
  border-bottom: 1px solid #dbcbd6 !important;
}
#app .view table tbody td small, #app .view table tbody td .muted,
#app .view table tbody td .subtext { color: var(--g6-muted) !important; opacity: 1 !important; }
#app .view table tbody td.ok { color: #11613b !important; }
#app .view table tbody td.bad { color: #9c1534 !important; }
#app .view table thead th {
  background: #4d1030 !important;
  color: #fff !important;
  border-bottom: 1px solid #844868 !important;
  font-weight: 750 !important;
}
#app .view table tbody td a, #app .view table tbody td .view-details,
#app .view table tbody td summary { color: #771549 !important; font-weight: 650; }
#app .view .table-wrap .filter-row th {
  background: #f7f0f5 !important;
  color: #2a202d !important;
}
/* Controls on dark/burgundy toolbars keep their own readable label colors. */
#app .view .grn-bulk-toolbar label, #app .view .grn-filter label,
#app .view .grn-import label { color: #fff !important; }
#app .view .grn-bulk-toolbar strong, #app .view .grn-filter strong { color: #fff !important; }
#app .view .table-wrap input[type='checkbox'] { accent-color: #8c1c56; }
#app .view table tbody td button:disabled { opacity: .58 !important; cursor: not-allowed; }
/* Neutral explanatory text above grids stays readable on tinted backgrounds. */
#app .view .table-info, #app .view .table-summary,
#app .view .table-count { color: #302333 !important; }
@media (max-width: 760px) {
  #app .view table, #app .view th, #app .view td { font-size: 13px !important; }
}
