#portalHome .portal-project-card {
  display: flex;
  gap: .55rem;
  padding: 0;
  overflow: hidden;
}
.portal-project-link {
  display: grid;
  flex: 1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(.5rem, 1.25vw, .85rem);
  align-items: center;
  min-width: 0;
  min-height: 5.2rem;
  padding: .75rem 0 .75rem clamp(.7rem, 2vw, 1.3rem);
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.portal-project-card:not(:has(.project-weather-badge:not([hidden]))) .portal-project-link { padding-inline-end: clamp(.7rem, 2vw, 1.3rem); }
.project-weather-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: .32rem;
  min-height: 44px;
  min-width: 60px;
  margin-inline-end: clamp(.65rem, 2vw, 1.1rem);
  padding: .35rem .55rem;
  color: #21536f;
  background: linear-gradient(135deg, #eef8ff, #deedf9);
  border: 1px solid #cce3f2;
  border-radius: .8rem;
  font-size: .82rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.project-weather-badge[data-weather=sun] { color: #85440c; border-color: #f0daa5; background: linear-gradient(135deg, #fff9e8, #ffedbb); }
.project-weather-badge[data-weather=thunder] { color: #514285; border-color: #d9d2f2; background: linear-gradient(135deg, #f3efff, #e6defa); }
.project-weather-badge[data-weather=snow] { color: #1c5873; border-color: #c8e9f0; background: linear-gradient(135deg, #f0fdff, #dbf5fb); }
.project-weather-badge:hover { filter: brightness(.96); }
.project-weather-badge:focus-visible, .portal-project-link:focus-visible { outline: 2px solid var(--aireva-focus); outline-offset: -3px; }
.project-weather-badge svg, .project-weather-current svg, .project-weather-day-summary svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.project-weather-badge[hidden], .project-weather-dialog [hidden] { display: none; }
.project-weather-dialog {
  width: min(36rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  padding: 0;
  border: 1px solid #cddde8;
  border-radius: 1.15rem;
  color: #173246;
  background: #fff;
  box-shadow: 0 20px 70px #101f3380;
}
.project-weather-dialog::backdrop { background: #0d2135a6; }
.project-weather-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  padding: 1.1rem clamp(.95rem, 3vw, 1.45rem);
  color: #fff;
  background: linear-gradient(135deg, #16384d, #225d78);
  overflow-wrap: anywhere;
}
.project-weather-header h2 { font-size: 1.18rem; font-weight: 750; line-height: 1.2; }
.project-weather-header p { margin-top: .25rem; color: #dbeaf5; font-size: .83rem; }
.project-weather-header button { width: 44px; height: 44px; border: 1px solid #ffffff50; border-radius: .7rem; background: #ffffff15; font-size: 1.25rem; }
.project-weather-header button:hover { background: #ffffff2b; }
.project-weather-current { display: flex; grid-column: 1 / -1; flex-wrap: wrap; align-items: center; gap: .5rem .65rem; color: #e3f5ff; }
.project-weather-current svg { width: 2rem; height: 2rem; color: #bde6ff; }
.project-weather-current[data-weather=sun] svg, .project-weather-current[data-weather=mixed] svg { color: #fce19a; }
.project-weather-current strong { color: #fff; font-size: 1.85rem; line-height: 1; }
.project-weather-body { padding: .85rem clamp(.95rem, 3vw, 1.45rem) 1.15rem; }
#weatherStatus { margin: 0 0 .7rem; font-size: .85rem; color: #38576b; }
.project-weather-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin-bottom: .9rem; }
.project-weather-metrics div { min-width: 0; padding: .55rem .5rem; border: 1px solid #e0ebf3; background: #f4f8fb; border-radius: .65rem; }
.project-weather-metrics dt { font-size: .75rem; color: #486274; }
.project-weather-metrics dd { margin: .15rem 0 0; font-size: .91rem; font-weight: 750; overflow-wrap: anywhere; }
.project-weather-body h3 { margin-bottom: .4rem; font-size: .95rem; font-weight: 750; }
.project-weather-day { border-top: 1px solid #e3edf3; }
.project-weather-day:last-child { border-bottom: 1px solid #e3edf3; }
.project-weather-day-summary {
  display: grid;
  grid-template-columns: minmax(5.8rem, .8fr) 1.25rem 2.55rem minmax(1.15rem, 1fr) 2.55rem .55rem;
  align-items: center;
  gap: clamp(.24rem, 1vw, .7rem);
  min-height: 44px;
  padding: .28rem .25rem;
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
  list-style: none;
  cursor: pointer;
}
.project-weather-day-summary::-webkit-details-marker { display: none; }
.project-weather-day-summary::after { content: '›'; color: #486274; font-size: 1.12rem; }
.project-weather-day[open] .project-weather-day-summary::after { transform: rotate(90deg); }
.project-weather-day-summary:hover, .project-weather-day[open] .project-weather-day-summary { background: #f4f8fb; }
.project-weather-day-summary:focus-visible { outline: 2px solid var(--aireva-focus); outline-offset: -2px; }
.weather-day-name { font-weight: 700; text-transform: capitalize; }
.weather-day-low, .weather-day-high { text-align: end; white-space: nowrap; }
.weather-day-low { color: #486274; }
.project-weather-day-summary svg { color: #276987; }
.project-weather-day-summary[data-weather=sun] svg { color: #946014; }
.project-weather-day-summary[data-weather=thunder] svg { color: #5a4894; }
.weather-day-range { position: relative; height: .28rem; border-radius: 1rem; background: #e0eaf2; }
.weather-day-range::before {
  position: absolute;
  inset-block: 0;
  inset-inline-start: max(0px, calc(var(--weather-range-start) - .12rem));
  inset-inline-end: max(0px, calc(100% - var(--weather-range-end) - .12rem));
  content: '';
  border-radius: inherit;
  background: linear-gradient(90deg, #53abc0, #d69137);
}
.weather-day-range-empty::before { display: none; }
.project-weather-table { overflow-x: auto; }
.project-weather-day .project-weather-table { padding-block: .2rem .5rem; }
.project-weather-body table { width: 100%; text-align: left; font-size: .78rem; }
.project-weather-body :is(th, td) { padding: .38rem .3rem; border-bottom: 1px solid #e3edf3; }
.project-weather-body td:nth-child(n+3) { white-space: nowrap; }
.project-weather-source { display: inline-block; margin-top: .65rem; color: #245c78; font-size: .74rem; text-decoration: underline; }
@media (max-width: 28rem) {
  .portal-project-link { min-height: 4.7rem; grid-template-columns: auto minmax(0, 1fr); }
  .portal-project-link .portal-arrow { display: none; }
  .project-weather-badge { min-width: 56px; }
}

/* Projektų sąrašas: tamsus skydelis su suvestine, paieška, kortelės su skaičiais ir greitomis nuorodomis */
#portalProjects .pj-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; padding: 1.35rem; border: 0;
  border-radius: 1.25rem; color: #e6f2f5;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(circle at 90% -10%, rgba(23, 123, 136, .65), transparent 55%),
    linear-gradient(135deg, #12212b, #182b38 60%, #12303b);
  box-shadow: 0 18px 40px rgba(18, 33, 43, .22); }
.pj-hero > * { width: 100%; min-width: 0; }
.pj-hero-top { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .75rem; }
.pj-hero-intro { display: grid; gap: .25rem; }
.pj-kicker { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #5fd4df; }
.pj-hero .workspace-title { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); color: #fff; }
.pj-hero-text { margin: 0; color: rgba(230, 242, 245, .75); font-size: .92rem; }
.pj-hero .portal-back { flex: none; }
.pj-tiles { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.pj-tiles:empty { display: none; }
.pj-tile { position: relative; display: grid; gap: .2rem; padding: .85rem 1rem; border-radius: 1rem; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06); backdrop-filter: blur(6px); }
.pj-tile[data-tone]::before { content: ''; position: absolute; top: 1rem; right: 1rem; width: .5rem; height: .5rem; border-radius: 50%; }
.pj-tile[data-tone=ok]::before { background: #34d399; box-shadow: 0 0 10px #34d399; }
.pj-tile[data-tone=warn]::before { background: #fbbf24; box-shadow: 0 0 10px #fbbf24; }
.pj-tile[data-tone=bad]::before { background: #fb7185; box-shadow: 0 0 10px #fb7185; }
.pj-tile-head { font-size: .8rem; color: rgba(230, 242, 245, .8); }
.pj-tile strong { font-size: 1.3rem; color: #fff; font-variant-numeric: tabular-nums; }
.pj-tile-note { font-size: .78rem; color: rgba(230, 242, 245, .65); }

.pj-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .85rem; }
.pj-tools input, .pj-tools select { min-height: 2.75rem; padding: .45rem .75rem; border: 1px solid #d6dee6; border-radius: .75rem; background: #fff; font: inherit; color: #0f172a; }
.pj-tools input { flex: 1 1 16rem; }
.pj-tools select { flex: 0 1 16rem; }
.pj-empty { padding: 1rem; text-align: center; color: var(--workspace-muted); border: 1px dashed #cbd5e1; border-radius: .9rem; }

#portalHome .portal-project-card { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 0; padding: 0; overflow: hidden; border-radius: 1.1rem; transition: border-color .15s ease, box-shadow .15s ease; }
#portalHome .portal-project-card:hover { background: #fff; border-color: #a9cfdc; box-shadow: 0 8px 22px rgba(22, 91, 109, .1); }
#portalHome .portal-project-card[data-current=true] { border-color: #177b88; box-shadow: inset 4px 0 #177b88, 0 8px 22px rgba(22, 91, 109, .1); }
.pj-card-top { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.pj-card-title { display: grid; gap: .1rem; min-width: 0; }
.pj-address { font-size: .84rem; color: var(--workspace-muted); overflow-wrap: anywhere; }
.pj-address:empty { display: none; }
[data-current=true] .pj-address { color: #177b88; font-weight: 600; }
.pj-stats { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 clamp(.7rem, 2vw, 1.3rem) .75rem; }
.pj-stat { display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 650; border: 1px solid transparent;
  font-variant-numeric: tabular-nums; }
.pj-stat[data-tone=plain] { background: #f1f5f9; color: #334155; }
.pj-stat[data-tone=ok] { background: #f0fdf4; color: #15803d; border-color: #86efac; }
.pj-stat[data-tone=warn] { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.pj-stat[data-tone=bad] { background: #fff1f2; color: #be123c; border-color: #fda4af; }
.pj-links { display: flex; flex-wrap: wrap; gap: .35rem; padding: .65rem clamp(.7rem, 2vw, 1.3rem); border-top: 1px solid #e2e8f0; background: #f8fafc; }
.pj-link { display: inline-flex; align-items: center; min-height: 2.25rem; padding: .25rem .75rem; border-radius: 999px; border: 1px solid #d6dee6; background: #fff;
  color: #164e60; font-size: .82rem; font-weight: 650; text-decoration: none; }
.pj-link:hover { border-color: #177b88; background: #e6f2f5; }
.pj-link:focus-visible { outline: 2px solid #177b88; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { #portalHome .portal-project-card { transition: none; } }
@media (max-width: 40rem) {
  .pj-tools select { flex: 1 1 100%; }
  .pj-link { min-height: 44px; }
}
/* Telefone skydelis kompaktiškas, kad kortelės (ir jų orai) matytųsi iškart */
@media (max-width: 40rem) {
  #portalProjects .pj-hero { gap: .7rem; padding: .9rem; }
  .pj-hero-text, .pj-tile-note { display: none; }
  .pj-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .pj-tile { padding: .55rem .7rem; gap: .05rem; }
  .pj-tile strong { font-size: 1.1rem; }
}
.pj-tools[hidden], .pj-stats[hidden], .pj-links[hidden] { display: none; }
@media (max-width: 40rem) { .pj-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .pj-link { justify-content: center; } }
