/* UI GÓI 06 v3 - Site theme (Light/Dark) - high contrast, readable
   Marker: UI06V4
*/
:root{
  --site-bg:#f4f6f9;
  --site-surface:#ffffff;
  --site-surface-2:#f8fafc;
  --site-text:#111827;
  --site-muted:#6b7280;
  --site-border:rgba(0,0,0,.12);
  --site-shadow:0 10px 28px rgba(0,0,0,.08);
  --site-link:#2563eb;
  --site-link-hover:#1d4ed8;
  --site-focus:rgba(37,99,235,.35);
  --site-navbar:#0f172a; /* keep navbar dark in both modes */
  --site-navbar-text:#ffffff;
  --site-navbar-muted:rgba(255,255,255,.75);
  --site-accent:#2563eb;
  --site-code-bg:#0b1220;
  --site-code-text:#e5e7eb;
}

body{ background:var(--site-bg); color:var(--site-text); }
a{ color:var(--site-link); }
a:hover,a:focus{ color:var(--site-link-hover); }

body[data-site-theme="dark"]{
  --site-bg:#0b1220;
  --site-surface:#0f172a;
  --site-surface-2:#111b31;
  --site-text:#e5e7eb;
  --site-muted:#aab4c5;
  --site-border:rgba(255,255,255,.14);
  --site-shadow:0 14px 34px rgba(0,0,0,.55);
  --site-link:#7aa2ff;
  --site-link-hover:#a5c1ff;
  --site-focus:rgba(122,162,255,.42);
}

/* Apply readable colors broadly (override legacy BS3 colors) */
body[data-site-theme="dark"],
body[data-site-theme="dark"] #wrapper,
body[data-site-theme="dark"] #page-wrapper,
body[data-site-theme="dark"] .container-fluid{
  color:var(--site-text);
}

body[data-site-theme="dark"] .panel,
body[data-site-theme="dark"] .well,
body[data-site-theme="dark"] .list-group-item,
body[data-site-theme="dark"] .dropdown-menu,
body[data-site-theme="dark"] .modal-content,
body[data-site-theme="dark"] .navbar-default{
  background:var(--site-surface);
  color:var(--site-text);
  border-color:var(--site-border);
}

body[data-site-theme="dark"] .panel-heading,
body[data-site-theme="dark"] .modal-header{
  background:var(--site-surface-2);
  color:var(--site-text);
  border-color:var(--site-border);
}

body[data-site-theme="dark"] .table,
body[data-site-theme="dark"] table{
  color:var(--site-text);
}
body[data-site-theme="dark"] .table>thead>tr>th{
  background:var(--site-surface-2);
  color:var(--site-text);
  border-bottom-color:var(--site-border);
}
body[data-site-theme="dark"] .table>tbody>tr>td,
body[data-site-theme="dark"] .table>tbody>tr>th{
  border-top-color:var(--site-border);
}
body[data-site-theme="dark"] .table-hover>tbody>tr:hover{
  background:rgba(255,255,255,.04);
}

body[data-site-theme="dark"] .form-control,
body[data-site-theme="dark"] select,
body[data-site-theme="dark"] textarea{
  background:var(--site-surface-2);
  color:var(--site-text);
  border-color:var(--site-border);
}
body[data-site-theme="dark"] .form-control::placeholder{ color:rgba(229,231,235,.55); }

/* Navbar brand + toggle button visible in dark */
.navbar-inverse, .navbar{ background:var(--site-navbar) !important; }
.navbar .navbar-brand, .navbar .navbar-nav>li>a{ color:var(--site-navbar-text) !important; }
.navbar .navbar-nav>li>a:hover{ color:var(--site-navbar-text) !important; opacity:.9; }

/* Focus visible */
:focus{ outline:none; }
:focus-visible{
  box-shadow:0 0 0 3px var(--site-focus);
  border-radius:6px;
}

/* Skip link */
.skip-link{
  position:absolute; left:-9999px; top:10px;
  padding:8px 10px; background:#111827; color:#fff;
  border-radius:8px; z-index:99999; text-decoration:none;
}
.skip-link:focus{ left:10px; }

/* Small build stamp for verification */
.ui-build-stamp{
  display:inline-block;
  margin-left:10px;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:rgba(255,255,255,.9);
  font-size:12px;
  line-height:20px;
}


/* v4 contrast fix: ensure text inherits theme vars */
body[data-site-theme="dark"] .navbar,
body[data-site-theme="dark"] .navbar a,
body[data-site-theme="dark"] .navbar-nav>li>a,
body[data-site-theme="dark"] .dropdown-menu>li>a,
body[data-site-theme="dark"] #page-wrapper,
body[data-site-theme="dark"] .panel,
body[data-site-theme="dark"] .panel-heading,
body[data-site-theme="dark"] .panel-body,
body[data-site-theme="dark"] .table,
body[data-site-theme="dark"] .table>thead>tr>th,
body[data-site-theme="dark"] .table>tbody>tr>td,
body[data-site-theme="dark"] label,
body[data-site-theme="dark"] .help-block{
  color: var(--site-text) !important;
}
body[data-site-theme="dark"] .text-muted{ color: var(--site-muted) !important; }
body[data-site-theme="dark"] .panel-heading{ background: var(--site-surface-2) !important; border-color: var(--site-border) !important; }
body[data-site-theme="dark"] .table>thead>tr>th{ background: var(--site-surface-2) !important; }
body[data-site-theme="dark"] .form-control{
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .dropdown-menu{
  background: var(--site-surface) !important;
  border-color: var(--site-border) !important;
}
body[data-site-theme="dark"] .dropdown-menu>li>a:hover{
  background: rgba(255,255,255,.06) !important;
}

/* Header copyright: keep in source but always invisible (do not affect layout) */
.me-header-copyright-ghost{
  position:absolute !important;
  left:-9999px !important;
  top:auto !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
  color: var(--site-bg) !important;
}

/* Hide any build/version stamp in navbar */
.ui-build-stamp{ display:none !important; }
