/* LilyJoTracker v0.2.7n37d — Public-Site Dashboard Style
   Maritime Dashboard deliberately follows the dark public Follow dashboard.
   Tracker and all other modules are untouched.
*/

html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content{
  --pd-bg:#d9edf0;
  --pd-shell:#041827;
  --pd-shell-2:#061d2d;
  --pd-card:#061927;
  --pd-card-2:#082131;
  --pd-border:#14516c;
  --pd-border-soft:#103f56;
  --pd-text:#f6fbff;
  --pd-muted:#9bb7c8;
  --pd-dim:#6f93a7;
  --pd-cyan:#16b6f2;
  --pd-cyan-2:#52d7f4;
  --pd-orange:#ff8a22;
  --pd-green:#55ef73;
  --pd-yellow:#ffd04a;
  --pd-purple:#e8e2ff;
  --pd-danger:#ff626d;
  --pd-radius:24px;
  --pd-card-radius:17px;
  color:var(--pd-text);
}

/* The page itself remains compatible with the tracker shell, but the actual
   dashboard becomes a dedicated dark bridge panel like the public website. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content.dashboard-public-n37d{
  max-width:1540px;
  margin:0 auto;
  padding-bottom:28px;
}

html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-shell{
  padding:20px!important;
  background:
    radial-gradient(circle at 15% 0%,rgba(22,182,242,.06),transparent 31%),
    linear-gradient(180deg,var(--pd-shell-2),var(--pd-shell))!important;
  border:1px solid var(--pd-border)!important;
  border-radius:var(--pd-radius)!important;
  box-shadow:
    0 20px 42px rgba(3,23,37,.16),
    inset 0 1px 0 rgba(255,255,255,.025)!important;
  color:var(--pd-text)!important;
}

/* Status strip */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-live-strip,
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37-live-strip{
  margin:0 0 18px!important;
  min-height:62px!important;
  padding:12px 16px!important;
  background:linear-gradient(180deg,#071f30,#061a29)!important;
  border:1px solid var(--pd-border)!important;
  border-radius:18px!important;
  box-shadow:none!important;
  color:var(--pd-text)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content #db-live-state{
  color:var(--pd-text)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content
:is(#db-runtime-note,#db-age){
  color:var(--pd-muted)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .source-badge{
  background:#08283a!important;
  color:var(--pd-cyan-2)!important;
  border-color:#17617f!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .source-badge.live{
  color:var(--pd-green)!important;
  border-color:rgba(85,239,115,.38)!important;
  background:rgba(26,132,75,.16)!important;
}

/* Main instruments: same black/navy card family as public Follow dashboard. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-grid{
  gap:14px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}

html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card{
  min-width:0;
  min-height:210px;
  padding:16px!important;
  background:
    linear-gradient(180deg,#082334 0%,#061a29 100%)!important;
  border:1px solid var(--pd-border)!important;
  border-radius:var(--pd-card-radius)!important;
  box-shadow:none!important;
  color:var(--pd-text)!important;
  overflow:hidden!important;
}

/* n37c/n37a light rules must never bleed through. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card::before,
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37c-instrument-card::before{
  display:none!important;
}

html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card
:is(h1,h2,h3,h4,.title,.label,small){
  color:var(--pd-muted)!important;
  text-shadow:none!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card
:is(strong,b,.value,.big,.number){
  color:var(--pd-text)!important;
  text-shadow:none!important;
}

/* Public Follow style label */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card
:is(small,.label){
  font-size:11px!important;
  font-weight:850!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
}

/* Accent values modelled after the public dashboard screenshot. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-sog
:is(strong,b,.value,.big,.number,svg text){color:var(--pd-cyan)!important;fill:var(--pd-cyan)!important}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-cog
:is(strong,b,.value,.big,.number,svg text){color:var(--pd-orange)!important;fill:var(--pd-orange)!important}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-heading
:is(strong,b,.value,.big,.number,svg text){color:var(--pd-text)!important;fill:var(--pd-text)!important}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-depth
:is(strong,b,.value,.big,.number,svg text){color:var(--pd-cyan)!important;fill:var(--pd-cyan)!important}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-apparent
:is(strong,b,.value,.big,.number,svg text){color:var(--pd-yellow)!important;fill:var(--pd-yellow)!important}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-truewind
:is(strong,b,.value,.big,.number,svg text){color:var(--pd-cyan-2)!important;fill:var(--pd-cyan-2)!important}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-rpm
:is(strong,b,.value,.big,.number,svg text){color:var(--pd-cyan)!important;fill:var(--pd-cyan)!important}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-position
:is(strong,b,.value,.big,.number){color:var(--pd-cyan-2)!important}

/* Gauge / compass lines: keep needles, soften grids so they resemble the
   public dark bridge cards instead of glowing white on pale cards. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card svg{
  filter:none!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card svg text{
  text-shadow:none!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card svg
:is(circle,line,path){
  opacity:.95;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card svg
:is(circle,line,path)[stroke="white"],
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card svg
:is(circle,line,path)[stroke="#fff"],
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card svg
:is(circle,line,path)[stroke="#ffffff"]{
  stroke:#5f8497!important;
}

/* Last-known-position card gets the same public card proportions, not a
   separate light Tracker card. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-position{
  background:linear-gradient(180deg,#082334,#061a29)!important;
  border-color:var(--pd-border)!important;
}

/* Lower dashboard: dark panels too, with the same thin blue outline. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-lower-grid{
  gap:14px!important;
  margin-top:16px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card{
  padding:18px!important;
  background:linear-gradient(180deg,#082334,#061a29)!important;
  border:1px solid var(--pd-border)!important;
  border-radius:var(--pd-card-radius)!important;
  box-shadow:none!important;
  color:var(--pd-text)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card::before{
  display:none!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card
:is(h1,h2,h3,h4,strong,b){
  color:var(--pd-text)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card
:is(p,span,small){
  color:var(--pd-muted)!important;
}

/* Statistics tiles mimic public metric cells. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card
:is(.metric,.stat,.stat-card,.tile){
  background:#071c2b!important;
  border:1px solid var(--pd-border-soft)!important;
  border-radius:12px!important;
  color:var(--pd-text)!important;
  box-shadow:none!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card
:is(.metric,.stat,.stat-card,.tile) small{
  color:var(--pd-muted)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card
:is(.metric,.stat,.stat-card,.tile) :is(strong,b){
  color:var(--pd-cyan-2)!important;
}

/* Context and NMEA data rows */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card .context-row{
  background:transparent!important;
  border-color:rgba(97,157,184,.38)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card .context-row span{
  color:var(--pd-muted)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card .context-row strong{
  color:var(--pd-text)!important;
}

/* Legacy row/table-like blocks within NMEA quality. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card table,
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card tbody,
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card tr,
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card td,
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-info-card th{
  background:transparent!important;
  color:var(--pd-text)!important;
  border-color:rgba(97,157,184,.35)!important;
}

/* Force previous n37c light dashboard palette out of this page. */
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content
:is(.db37c-shell,.db37c-instrument-grid,.db37c-lower-grid){
  color:var(--pd-text)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content
.db37c-instrument-card{
  background:linear-gradient(180deg,#082334,#061a29)!important;
  border-color:var(--pd-border)!important;
  color:var(--pd-text)!important;
}
html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content
.db37c-info-card{
  background:linear-gradient(180deg,#082334,#061a29)!important;
  border-color:var(--pd-border)!important;
  color:var(--pd-text)!important;
}

/* Public-like responsive proportions */
@media(min-width:1200px){
  html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-lower-grid{
    display:grid!important;
    grid-template-columns:1.15fr 1fr 1fr!important;
  }
}
@media(max-width:1199px) and (min-width:760px){
  html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:759px){
  html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-shell{
    padding:12px!important;
    border-radius:18px!important;
  }
  html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-grid,
  html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-lower-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:11px!important;
  }
  html[data-tracker-theme="maritime"] body.lilyjo-dashboard-n37d #content .db37d-instrument-card{
    min-height:170px;
  }
}

/* Classic remains the old dashboard by design. */
html[data-tracker-theme="classic"] body.lilyjo-dashboard-n37d #content .db37d-shell{
  /* no forced public palette */
}
