/* TaskNexoPro v9 — brand visibility and a consistent member dashboard.
   Apply after the existing v8 theme. No backend, balance or route changes. */

/* Mark: a legible shield on every background. Deliberately modest size and no glow. */
.tn-body .tn-site-header .tn-brand-mark {
  width:46px!important;height:46px!important;min-width:46px;
  padding:4px!important;display:inline-flex!important;align-items:center;justify-content:center;
  background:#eaf8f4!important;border:1px solid #c8e9de!important;
  border-radius:12px!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.65)!important;
}
.tn-body .tn-site-header .tn-brand-mark img {
  display:block;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
  object-fit:contain;filter:contrast(1.08) saturate(1.12);
}
.tn-body .tn-site-header .tn-brand {gap:10px!important;}
.tn-body .tn-footer .tn-brand-mark {
  width:38px!important;height:38px!important;padding:3px!important;
  display:inline-flex!important;align-items:center;justify-content:center;
  background:#eaf8f4!important;border:1px solid #c8e9de!important;border-radius:10px!important;
}
.tn-body .tn-footer .tn-brand-mark img {display:block;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain;}
html[data-tn-theme="light"] .tn-body .tn-site-header .tn-brand-mark {background:#eaf7f3!important;border-color:#d7eae4!important;box-shadow:none!important;}
@media (max-width:575.98px) {
  .tn-body .tn-site-header .tn-brand-mark {width:41px!important;height:41px!important;min-width:41px;padding:3px!important;border-radius:10px!important;}
  .tn-body .tn-site-header .tn-brand-name {font-size:16px!important;}
}

/* The older member-header SVG rule otherwise shows both theme icons in dark mode. */
html:not([data-tn-theme="light"]) .tn-theme-switch svg.tn-switch-sun {display:none!important;}
html:not([data-tn-theme="light"]) .tn-theme-switch svg.tn-switch-moon {display:block!important;}
html[data-tn-theme="light"] .tn-theme-switch svg.tn-switch-sun {display:block!important;}
html[data-tn-theme="light"] .tn-theme-switch svg.tn-switch-moon {display:none!important;}

/* Dashboard tokens are applied to its full canvas rather than cards alone. */
html[data-tn-theme="light"] body.tn-page-dash {
  --tn-dash-bg:#f3f7f9;--tn-dash-surface:#fff;--tn-dash-surface2:#f5f9fa;
  --tn-dash-border:#dce7eb;--tn-dash-ink:#173247;--tn-dash-muted:#607b8c;
  --tn-dash-accent:#12966d;--tn-dash-shadow:0 6px 18px rgba(23,55,72,.035);
}
html:not([data-tn-theme="light"]) body.tn-page-dash {
  --tn-dash-bg:#0c121c;--tn-dash-surface:#181f2b;--tn-dash-surface2:#1d2835;
  --tn-dash-border:#2b3745;--tn-dash-ink:#f1f6f9;--tn-dash-muted:#9aafbd;
  --tn-dash-accent:#62e9af;--tn-dash-shadow:none;
}
/* This was the root mismatch: legacy .tn-main retained #0a0e17 in light mode. */
body.tn-page-dash .tn-main {background:var(--tn-dash-bg)!important;color:var(--tn-dash-ink);}
body.tn-page-dash .tn-member-shell,body.tn-page-dash .tn-page-container,
body.tn-page-dash .tn-member-grid,body.tn-page-dash .tn-account-content {
  background:transparent!important;color:var(--tn-dash-ink);
}
body.tn-page-dash .tn-member-shell {padding-top:30px;padding-bottom:46px;}
body.tn-page-dash .tn-member-grid {grid-template-columns:205px minmax(0,1fr);gap:22px;align-items:start;}
body.tn-page-dash .tn-account-content {min-width:0;overflow:visible;}
body.tn-page-dash .tn-sidebar {
  border:1px solid var(--tn-dash-border)!important;background:var(--tn-dash-surface)!important;
  border-radius:12px!important;box-shadow:var(--tn-dash-shadow)!important;top:93px;padding:10px!important;
}
body.tn-page-dash .tn-dash-topline {margin:0 0 19px!important;min-height:37px;align-items:center;}
body.tn-page-dash .tn-dash-topline h1,body.tn-page-dash .tn-dash-topline h2 {
  color:var(--tn-dash-ink)!important;font-weight:800!important;letter-spacing:-.055em!important;
  font-size:clamp(27px,2.65vw,33px)!important;line-height:1.15!important;
}
body.tn-page-dash .tn-dash-topline .tn-title-dot {color:var(--tn-dash-accent)!important;}
body.tn-page-dash .tn-overview-grid {
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;
  gap:13px!important;margin:0 0 20px!important;
}
body.tn-page-dash .tn-overview-card {
  background:var(--tn-dash-surface)!important;border:1px solid var(--tn-dash-border)!important;
  border-radius:11px!important;box-shadow:var(--tn-dash-shadow)!important;
  padding:17px!important;min-height:143px!important;min-width:0;
  display:flex!important;flex-direction:column;overflow:hidden;
}
body.tn-page-dash .tn-overview-card.tn-balance-card {
  background:color-mix(in srgb,var(--tn-dash-surface) 87%,#37d6a0 13%)!important;
  border-color:color-mix(in srgb,var(--tn-dash-border) 75%,#37d6a0 25%)!important;
}
body.tn-page-dash .tn-overview-label {
  color:var(--tn-dash-muted)!important;font-size:11px!important;font-weight:700;
  margin-bottom:11px!important;line-height:1.4;
}
body.tn-page-dash .tn-overview-card strong {
  font-size:clamp(21px,1.85vw,25px)!important;font-weight:800;
  color:var(--tn-dash-ink)!important;margin-bottom:9px!important;
  line-height:1.2;letter-spacing:-.045em;
}
body.tn-page-dash .tn-overview-card.tn-balance-card strong {color:var(--tn-dash-accent)!important;}
body.tn-page-dash .tn-overview-muted,body.tn-page-dash .tn-overview-card a {
  margin-top:auto!important;padding-top:9px!important;font-size:11px!important;
  color:var(--tn-dash-muted)!important;line-height:1.4;
}
body.tn-page-dash .tn-overview-card a:hover {color:var(--tn-dash-accent)!important;}
body.tn-page-dash .tn-dashboard-details {
  background:var(--tn-dash-surface)!important;border:1px solid var(--tn-dash-border)!important;
  border-radius:12px!important;box-shadow:var(--tn-dash-shadow)!important;
  overflow:hidden!important;margin:0 0 18px!important;
}
body.tn-page-dash .tn-dashboard-details>.card-header {
  background:var(--tn-dash-surface)!important;color:var(--tn-dash-ink)!important;
  border-bottom:1px solid var(--tn-dash-border)!important;padding:12px 16px!important;
}
body.tn-page-dash .tn-dashboard-details>.card-body {
  background:var(--tn-dash-surface)!important;color:var(--tn-dash-ink)!important;
  padding:22px!important;
}
body.tn-page-dash .tn-dashboard-details .nav-pills {
  display:flex;flex-wrap:wrap;gap:5px!important;
  background:var(--tn-dash-surface2)!important;padding:4px!important;border-radius:9px;
}
body.tn-page-dash .tn-dashboard-details .nav-pills .nav-link {
  background:transparent!important;color:var(--tn-dash-muted)!important;
  font-size:11.5px!important;font-weight:700;min-height:34px;
  border-radius:7px!important;padding:8px 13px!important;
}
body.tn-page-dash .tn-dashboard-details .nav-pills .nav-link:hover {color:var(--tn-dash-ink)!important;}
body.tn-page-dash .tn-dashboard-details .nav-pills .nav-link.active {
  background:color-mix(in srgb,var(--tn-dash-surface) 78%,#4edea3 22%)!important;
  color:var(--tn-dash-accent)!important;
}
body.tn-page-dash .tn-detail-heading {margin-bottom:14px!important;gap:10px;}
body.tn-page-dash .tn-detail-heading h3 {color:var(--tn-dash-ink)!important;font-size:15px!important;font-weight:800;}
body.tn-page-dash .tn-detail-heading a {color:var(--tn-dash-accent)!important;}
body.tn-page-dash .tn-mini-stats {
  background:var(--tn-dash-surface2)!important;border:1px solid var(--tn-dash-border)!important;
  border-radius:9px!important;overflow:hidden;
}
body.tn-page-dash .tn-mini-stats>div {
  background:var(--tn-dash-surface2)!important;border-color:var(--tn-dash-border)!important;
  padding:16px 13px!important;
}
body.tn-page-dash .tn-mini-stats span {color:var(--tn-dash-muted)!important;font-size:11px;}
body.tn-page-dash .tn-mini-stats strong {color:var(--tn-dash-ink)!important;font-size:18px;}
body.tn-page-dash .tn-dashboard-details .table {margin-bottom:7px;}
body.tn-page-dash .tn-dashboard-details .table td {
  vertical-align:middle;border-bottom:1px solid var(--tn-dash-border)!important;padding:13px 9px;
}
html[data-tn-theme="light"] body.tn-page-dash .tn-dashboard-details .table td {background:#fff!important;color:#344e60!important;}
html:not([data-tn-theme="light"]) body.tn-page-dash .tn-dashboard-details .table td {background:#181f2b!important;color:#d8e5ed!important;}

@media (max-width:1099.98px) {
  body.tn-page-dash .tn-member-grid {grid-template-columns:185px minmax(0,1fr);gap:16px;}
  body.tn-page-dash .tn-overview-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:767.98px) {
  body.tn-page-dash .tn-member-shell {padding-top:18px;padding-bottom:28px;}
  body.tn-page-dash .tn-member-grid {display:block;}
  body.tn-page-dash .tn-sidebar {position:static;margin-bottom:18px;}
  body.tn-page-dash .tn-overview-grid {gap:10px!important;margin-bottom:15px!important;}
  body.tn-page-dash .tn-overview-card {min-height:132px!important;padding:14px!important;}
  body.tn-page-dash .tn-dashboard-details>.card-body {padding:16px!important;}
}
@media (max-width:480px) {
  body.tn-page-dash .tn-overview-card {padding:12px!important;min-height:126px!important;}
  body.tn-page-dash .tn-overview-card strong {font-size:19px!important;}
  body.tn-page-dash .tn-dashboard-details>.card-header {padding:9px!important;}
  body.tn-page-dash .tn-dashboard-details>.card-body {padding:13px!important;}
  body.tn-page-dash .tn-dashboard-details .nav-pills .nav-link {padding:8px 9px!important;font-size:10px!important;}
}
@media (prefers-reduced-motion:reduce) {body.tn-page-dash *, .tn-body .tn-brand-mark img {transition:none!important;}}
