/* STRONGLMB360 V13.4 — Runtime CSS & Input Stability Cleanup
   Conservative final-layer stylesheet. It reduces visual/event friction without changing business logic. */
:root{
  --strong-bg: #f6f8fb;
  --strong-surface: #ffffff;
  --strong-surface-soft: #f9fafc;
  --strong-border: #d9e2ec;
  --strong-text: #172033;
  --strong-muted: #5d6b82;
  --strong-accent: #b88a2c;
  --strong-focus: rgba(34, 105, 180, .22);
  --strong-radius: 16px;
  --strong-shadow: 0 10px 28px rgba(21, 35, 58, .08);
}

html, body{
  background: var(--strong-bg);
  color: var(--strong-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Keep intro identity while avoiding dark fatigue inside the application. */
.app-shell, .main-content, main, .content-area, .dashboard-container, .module-container{
  background: var(--strong-bg);
  color: var(--strong-text);
}

.card, .kpi-card, .metric-card, .panel, .module-card, .dashboard-card, .report-card, .table-card,
[class*="card"], [class*="panel"]{
  background-color: var(--strong-surface);
  border-color: var(--strong-border);
  color: var(--strong-text);
  box-shadow: var(--strong-shadow);
  border-radius: var(--strong-radius);
}

/* Search/input stability: no transform, no jump, no repaint-heavy styling while focused. */
input, textarea, select, .search-input, [type="search"], [contenteditable="true"]{
  color: var(--strong-text);
  background-color: #fff;
  border: 1px solid var(--strong-border);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  transform: none;
}

input:focus, textarea:focus, select:focus, .search-input:focus, [type="search"]:focus, [contenteditable="true"]:focus{
  outline: 0;
  border-color: #3578bd;
  box-shadow: 0 0 0 4px var(--strong-focus);
  background-color: #fff;
  transform: none;
}

/* Avoid invisible placeholders in legacy dark/light conflicts. */
input::placeholder, textarea::placeholder{ color: #7b8798; opacity: 1; }

/* Tables: readable, premium, low fatigue. */
table{ background: #fff; color: var(--strong-text); border-collapse: separate; border-spacing: 0; }
th, thead td{ background: #eef3f8; color: #172033; border-bottom: 1px solid var(--strong-border); }
td{ border-bottom: 1px solid #edf1f5; }

/* Buttons: reduce competing gradients; keep gold as accent. */
button, .btn, [role="button"]{
  border-radius: 12px;
  transform: none;
}
button:hover, .btn:hover, [role="button"]:hover{ transform: none; }
.btn-primary, button.primary, .primary-action{
  background: #1f5f99;
  color: #fff;
  border-color: #1f5f99;
}
.btn-gold, .premium-accent, .accent-action{
  background: var(--strong-accent);
  color: #fff;
  border-color: var(--strong-accent);
}

/* Floating garbage remains hidden unless explicitly opened by diagnostics. */
.v10-watermark, .v126-watermark, .technical-floating, .legacy-floating-banner,
[id*="floating" i]:not([data-strong-allow-floating="true"]),
[class*="floating" i]:not([data-strong-allow-floating="true"]),
[class*="watermark" i]:not([data-strong-allow-floating="true"]){
  display: none;
}

/* Premium sidebar: keep navigation readable without overwhelming the user. */
.sidebar, aside, nav.sidebar, .side-nav{
  background: #172033;
  color: #e8edf5;
}
.sidebar a, .side-nav a, aside a{ color: #e8edf5; }
.sidebar .active, .side-nav .active, aside .active{
  background: rgba(255,255,255,.10);
  border-left: 3px solid var(--strong-accent);
}

@media (max-width: 900px){
  .dashboard-grid, .kpi-grid, .cards-grid{ grid-template-columns: 1fr; }
  .card, .kpi-card, .metric-card, .panel{ border-radius: 14px; }
  table{ font-size: 14px; }
}
