/* JUP INTEGRATION-02 — visual theme layered on top of the unchanged app.css.
 * Palette: navy #14263D, turquoise #20B8AD, gold #D4A94F, light bg #F7F9FC.
 * The official JUP logo (PNG, transparent) is never recoloured, cropped or stretched:
 * every <img> keeps its 3:1 ratio (width/height:auto + object-fit:contain). On dark
 * surfaces it sits on a light tile so its dark lettering stays readable.
 */
:root{
  --jup-navy:#14263D;
  --jup-navy-2:#1C3352;
  --jup-turquoise:#20B8AD;
  --jup-turquoise-tint:#E3F6F4;
  --jup-gold:#D4A94F;
  --jup-bg:#F7F9FC;
  --jup-tile:#FFFFFF;
}

/* base */
body{background:var(--jup-bg);color:var(--jup-navy)}
button{background:var(--jup-turquoise);color:var(--jup-navy)}
nav button{background:transparent}
.status{background:var(--jup-turquoise-tint);color:var(--jup-navy)}
/* .jobblock colours are kept: the schedule legend refers to them ("Niebieski: zaplanowane") */
.note.unread{border-left-color:var(--jup-turquoise)}
nav button.active{background:var(--jup-turquoise-tint);color:var(--jup-navy)}

/* official logo: generic guarantees */
.jup-platform img,.jup-hero-logo img{display:block;height:auto;max-width:100%;object-fit:contain}

/* login */
.login-shell{background:var(--jup-bg)}
.login-card{box-shadow:0 20px 60px #14263D1a}
.login-card .jup-logo-login{display:flex;justify-content:center;margin:0 0 18px}
.login-card .jup-logo-login img{width:min(320px,70vw);height:auto}

/* sidebar: platform logo on a light tile, organization block below */
#app aside{background:var(--jup-navy)}
#app aside .brand.jup-logo-side{background:var(--jup-tile);border-radius:14px;padding:10px 12px;display:flex;justify-content:center}
#app aside .brand.jup-logo-side img{width:100%;max-width:200px;height:auto}
.jup-org{display:flex;align-items:center;gap:8px;font-size:12px}
.jup-org[hidden]{display:none!important}
#app aside .jup-org{background:#ffffff0f;border-radius:10px;padding:8px 10px;color:#C8D5EA}
#app aside .jup-org .jup-org-name{color:#fff;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app aside .jup-org .jup-org-logo{max-height:30px;max-width:72px;width:auto;height:auto;object-fit:contain;background:#fff;border-radius:6px;padding:2px}
#app aside nav details[open],#app aside nav details[open] summary{background:var(--jup-navy-2)}
#app aside nav button:hover,#app aside nav summary:hover{background:var(--jup-navy-2)}
#app aside nav button.active{background:var(--jup-turquoise)!important;color:var(--jup-navy)!important;box-shadow:inset 3px 0 0 var(--jup-gold)}
#app aside .logout{background:var(--jup-navy-2);color:#F4F7FF}

/* organization name inside existing headings (filled from tenant data, empty otherwise) */
.jup-org-prefix:not(:empty)::after{content:" · "}
.jup-org-suffix:not(:empty)::before{content:" "}
.dash-eyebrow .jup-org-name{text-transform:uppercase}

/* dashboards (OWNER and FINANCE): platform mark = official logo on a light tile */
.dash-hero{background:linear-gradient(110deg,#0E1C2E,var(--jup-navy) 55%,#1C3A5C)}
.dash-hero .dash-eyebrow{color:var(--jup-gold)}
.dash-eyebrow{color:var(--jup-turquoise)}
.dash-hero-mark.jup-hero-logo{width:auto;height:auto;min-width:0;padding:12px 16px;background:var(--jup-tile);border:0;border-radius:18px;font-size:16px;color:var(--jup-navy)}
.dash-hero-mark.jup-hero-logo img{width:180px;height:auto}
.dash-kpi{border-top-color:var(--jup-turquoise)}
.dash-kpi strong{color:var(--jup-navy)}
.dash-secondary{background:var(--jup-turquoise-tint);color:var(--jup-navy)}
.dash-secondary:hover{background:#CDEFEC}
.dash-bar{background:linear-gradient(180deg,#4FD0C6,var(--jup-turquoise))}

/* tablet: the sidebar keeps its width in practice (verified at 820/1024px), so the logo
   simply scales inside its tile (max-width:100%); only the hero logo is reduced */
@media(max-width:900px){
  .dash-hero-mark.jup-hero-logo img{width:140px}
}
/* phone: app.css turns the sidebar into a top bar at <=760px */
@media(max-width:760px){
  #app aside .brand.jup-logo-side{justify-content:flex-start;padding:6px 10px;max-width:180px}
  #app aside .brand.jup-logo-side img{max-width:150px}
  .dash-hero{flex-wrap:wrap}
  .dash-hero-mark.jup-hero-logo{order:-1}
  .dash-hero-mark.jup-hero-logo img{width:120px}
}
