/* Web Applications page add-on CSS (works with your existing global style.css) */

.wa-hero{ padding: 52px 0 18px; }
.wa-hero__grid{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}
.wa-hero__cta{ display:flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 14px; }

.wa-bullets{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.wa-bullet{
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}
.wa-bullet__k{ font-weight: 950; }
.wa-bullet__v{ margin-top: 6px; color: rgba(240,244,255,0.62); font-weight: 700; font-size: 13.5px; }

.wa-demo{
  display:grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 14px;
  align-items: start;
}

/* Terminal */
.wa-terminal{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10, 12, 18, 0.62);
  overflow: hidden;
  box-shadow: 0 22px 70px rgba(0,0,0,0.28);
}
.wa-terminal__top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.wa-terminal__dots{ display:flex; gap: 7px; }
.dot{ width: 10px; height: 10px; border-radius: 999px; opacity: 0.9; }
.dot--r{ background: rgba(255, 90, 90, 0.95); }
.dot--y{ background: rgba(255, 210, 90, 0.95); }
.dot--g{ background: rgba(90, 255, 170, 0.95); }

.wa-terminal__title{
  flex: 1;
  font-weight: 850;
  font-size: 12.5px;
  color: rgba(240,244,255,0.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-terminal__actions{ display:flex; gap: 8px; }
.tbtn{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(240,244,255,0.86);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
}
.tbtn:hover{ background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); }

.wa-terminal__body{
  margin: 0;
  padding: 14px;
  min-height: 420px;
  max-height: 520px;
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(240,244,255,0.86);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.wa-terminal__hint{
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(240,244,255,0.60);
  font-weight: 650;
  font-size: 12px;
  background: rgba(255,255,255,0.03);
}

/* App */
.wa-app{
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  padding: 14px;
  overflow: hidden;
}
.wa-app__header{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.wa-app__badge{
  display:inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,170,0.28);
  background: rgba(0,255,170,0.10);
  color: rgba(0,255,170,0.92);
  font-weight: 950;
  font-size: 11px;
  width: fit-content;
}
.wa-app__name{
  margin-top: 6px;
  font-weight: 950;
  font-size: 18px;
}

.wa-app__filters{ display:flex; gap: 8px; flex-wrap: wrap; }
.fbtn{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,12,18,0.55);
  color: rgba(240,244,255,0.78);
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
}
.fbtn.is-on{
  border-color: rgba(140,120,255,0.30);
  background: rgba(140,120,255,0.14);
  color: rgba(240,244,255,0.92);
}

.wa-kpis{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.kpi{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,12,18,0.55);
}
.kpi__k{ color: rgba(240,244,255,0.64); font-weight: 750; font-size: 12px; }
.kpi__v{ margin-top: 6px; font-weight: 950; font-size: 22px; }
.kpi__s{ margin-top: 4px; color: rgba(240,244,255,0.60); font-weight: 700; font-size: 12px; }

.wa-charts{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.cardish{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,12,18,0.55);
  overflow: hidden;
}
.cardish__head{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.cardish__title{ font-weight: 950; }
.cardish__meta{ color: rgba(240,244,255,0.60); font-weight: 700; font-size: 12px; }
.chart canvas{ width: 100%; display:block; }

.wa-bottom{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.feed{
  padding: 10px 12px;
  display:grid;
  gap: 10px;
  max-height: 240px;
  overflow:auto;
}
.feed-item{
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.feed-item__t{ font-weight: 900; }
.feed-item__m{ margin-top: 4px; color: rgba(240,244,255,0.62); font-weight: 650; line-height: 1.45; }
.feed-item__s{ margin-top: 6px; color: rgba(240,244,255,0.56); font-weight: 700; font-size: 12px; }

.wa-explain__body{ padding: 10px 12px 12px; color: rgba(240,244,255,0.70); font-weight: 650; line-height: 1.65; }
.wa-explain__body ul{ margin: 0; padding-left: 18px; }
.wa-explain__cta{ display:flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* -----------------------------
   Progressive build reveal
------------------------------ */
.build-mask{
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: rgba(10,12,18,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  display: none;
  z-index: 5;
}
.is-building .build-mask{
  display: grid;
  place-items: center;
  padding: 18px;
}
.build-mask__inner{
  width: min(520px, 92%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  padding: 14px;
  text-align: left;
}
.build-mask__title{
  font-weight: 950;
  margin-bottom: 6px;
}
.build-mask__text{
  color: rgba(240,244,255,0.62);
  font-weight: 650;
  line-height: 1.6;
}
.build-mask__bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  margin-top: 12px;
}
.build-mask__bar > span{
  display:block;
  height:100%;
  width: 0%;
  background: linear-gradient(135deg, rgba(0,255,170,0.95), rgba(140,120,255,0.95));
}

.build-hidden{ opacity: 0; transform: translateY(8px); pointer-events: none; }
.build-show{ opacity: 1; transform: translateY(0); pointer-events: auto; transition: opacity 450ms ease, transform 450ms ease; }

.cardish, .kpi{
  transition: opacity 450ms ease, transform 450ms ease;
}

/* Responsive */
@media (max-width: 1100px){
  .wa-demo{ grid-template-columns: 1fr; }
  .wa-terminal__body{ min-height: 340px; }
}
@media (max-width: 980px){
  .wa-hero__grid{ grid-template-columns: 1fr; }
  .wa-bullets{ grid-template-columns: 1fr; }
  .wa-kpis{ grid-template-columns: 1fr 1fr; }
  .wa-charts{ grid-template-columns: 1fr; }
  .wa-bottom{ grid-template-columns: 1fr; }
}
@media (max-width: 560px){
  .wa-kpis{ grid-template-columns: 1fr; }
  .wa-terminal__actions{ display:none; }
}
