/* ==========================================================================
   Angola Transparente — Estilos das páginas da aplicação
   ========================================================================== */

/* ===================== PAINEL ===================== */
.dash-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(50% 70% at 78% 45%, rgba(61, 220, 154, .20), transparent 70%),
    radial-gradient(40% 50% at 100% 0%, rgba(61, 220, 154, .12), transparent 70%),
    linear-gradient(160deg, #073226 0%, #04221b 55%, #031a14 100%);
  color: #fff;
  padding-bottom: 96px;
}
.dash-hero::before { /* malha de circuitos */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(rgba(120, 240, 190, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 240, 190, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 80% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 80% at 70% 40%, #000 20%, transparent 75%);
}
.dash-hero::after { /* feixe de luz */
  content: ""; position: absolute; z-index: -1; top: -30%; right: -6%;
  width: 46%; height: 160%;
  background: linear-gradient(100deg, transparent 35%, rgba(130, 255, 205, .16) 50%, transparent 65%);
  transform: rotate(14deg); filter: blur(8px);
  animation: beam 7s ease-in-out infinite alternate;
}
@keyframes beam { from { opacity: .5; transform: rotate(14deg) translateX(-20px); } to { opacity: 1; transform: rotate(14deg) translateX(20px); } }

.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px; align-items: center;
  padding: 18px 40px 0 48px; min-height: 360px;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px; border-radius: 999px;
  background: rgba(61, 220, 154, .1); border: 1px solid rgba(61, 220, 154, .28);
  font-size: 12px; font-weight: 500; color: #b7f5da;
}
.live-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--mint); animation: pulse 1.8s ease-out infinite; }
.hero-copy h1 {
  margin: 18px 0 16px; color: #fff;
  font-size: clamp(36px, 4.2vw, 58px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em;
}
.hero-copy h1 .text-mint { background: linear-gradient(90deg, #3ddc9a, #8af5c6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p { color: #b9cfc7; font-size: 16px; line-height: 1.55; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-map { position: relative; height: 380px; }
.map3d {
  position: absolute; inset: -10px 8% -40px 10%;
  transform: perspective(1100px) rotateX(20deg) rotateZ(-5deg) rotateY(-6deg);
  transform-origin: 50% 60%;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45));
  animation: mapIn 1.3s var(--ease) both;
}
@keyframes mapIn { from { opacity: 0; transform: perspective(1100px) rotateX(35deg) rotateZ(-5deg) translateY(30px); } }
.map3d svg { width: 100%; height: 100%; }
.angola-hero .net-line { stroke-dasharray: 4 6; animation: flow 2.4s linear infinite; opacity: .75; }
.angola-hero .node { animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .35; } }
.angola-hero .pulse-ring { transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-out infinite; }

.glass {
  position: absolute; z-index: 2;
  background: linear-gradient(140deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 14px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6);
}
.stat-float { top: 0; right: 9%; padding: 14px 18px; min-width: 168px; animation: float 6s ease-in-out infinite; }
.stat-float .v { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat-float .v .delta { background: rgba(61, 220, 154, .2); color: #8af5c6; }
.stat-float small { display: block; font-size: 12px; color: #a9c4ba; margin-top: 2px; }
.luanda-card { left: 46%; bottom: 8px; padding: 12px 16px; animation: float 7s ease-in-out infinite -2s; }
.luanda-card b { display: block; font-size: 13px; }
.luanda-card span { display: block; font-size: 11.5px; color: #a9c4ba; line-height: 1.4; }
.luanda-card::before { content: ""; position: absolute; left: -46px; top: -38px; width: 46px; height: 46px; border-left: 1px dashed rgba(125, 255, 200, .5); border-top: 1px dashed rgba(125, 255, 200, .5); border-radius: 10px 0 0 0; }

.dash-content { padding-top: 0; }
.kpis { position: relative; z-index: 3; margin-top: -64px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kpi { display: flex; align-items: flex-start; gap: 16px; padding: 20px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.kpi-label { font-size: 12.5px; color: var(--muted); }
.kpi-value { font-family: var(--font-head); font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 8px; white-space: nowrap; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.grid-2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.chart-line { height: 250px; }
.donut-wrap { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 28px; }
.donut { width: 220px; height: 220px; }

.prov-list { display: flex; flex-direction: column; gap: 14px; }
.prov-row { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 12px; font-size: 12.5px; }
.prov-row b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; border-radius: 99px; background: #eef3f1; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0d5a45, #3ddc9a); width: 0; transition: width 1.2s var(--ease); }

/* ===================== CONTRATOS ===================== */
.search-row { display: flex; gap: 10px; }
.search-row .input { flex: 1; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.filters .spacer { flex: 1; }
.list-card { margin-top: 18px; overflow: hidden; }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border-2); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.empty-row td { text-align: center; color: var(--muted); padding: 40px; }

/* ===================== DETALHE DO CONTRATO ===================== */
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.25fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.detail-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.value-card { padding: 18px; border-radius: var(--radius-lg); background: linear-gradient(160deg, #f1faf6, #fff); border: 1px solid #d6ece2; position: relative; overflow: hidden; }
.value-card::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--mint-2); }
.value-card small { font-size: 12px; color: var(--muted); }
.value-card .big { font-family: var(--font-head); font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 14px; }
.value-card .big span { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 7px; }
.progress-label span { color: #128157; font-weight: 600; background: var(--mint-soft); padding: 1px 8px; border-radius: 6px; }
.progress-label b { font-weight: 700; }
.progress { height: 8px; border-radius: 99px; background: #e2efe9; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #0d5a45, #3ddc9a); transition: width 1.4s var(--ease); }
.meta-list { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.meta-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 6px; border-radius: 10px; transition: background .2s; }
.meta-item:hover { background: #f6faf8; }
.meta-item small { display: block; font-size: 11.5px; color: var(--muted); }
.meta-item b { display: block; font-size: 13px; font-weight: 600; margin-top: 1px; }

.gallery-main { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 10.5; background: #dfe8e4; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease, opacity .35s; }
.gallery-main:hover img { transform: scale(1.05); }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: rgba(61, 220, 154, .92); color: var(--g-950);
  box-shadow: 0 0 0 10px rgba(61, 220, 154, .25), 0 16px 30px -8px rgba(0, 0, 0, .5);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.play:hover { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 0 16px rgba(61, 220, 154, .2), 0 16px 30px -8px rgba(0, 0, 0, .5); }
.play [data-lucide], .play .lucide { width: 24px; height: 24px; fill: currentColor; margin-left: 3px; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: none; transition: border-color .2s, transform .2s; }
.gallery-thumbs button:hover { transform: translateY(-2px); }
.gallery-thumbs button.active { border-color: var(--mint-2); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.chart-bars { height: 190px; }
.milestones { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; position: relative; }
.ms { display: flex; gap: 10px; align-items: flex-start; position: relative; }
.ms-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--primary); color: #fff; }
.ms-dot [data-lucide], .ms-dot .lucide { width: 12px; height: 12px; stroke-width: 3; }
.ms-dot.prog { background: #fff; border: 2px solid var(--mint-2); }
.ms-dot.prog::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint-2); }
.ms-dot.todo { background: #fff; border: 2px solid #cdd8d3; }
.ms b { display: block; font-size: 12.5px; font-weight: 600; }
.ms small { font-size: 11.5px; color: var(--primary); font-weight: 500; }
.ms.todo small { color: var(--muted); }

/* ===================== DADOS ABERTOS ===================== */
.datasets { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 20px; }
.dataset { display: flex; flex-direction: column; padding: 22px; animation: fadeUp .5s var(--ease) both; }
.dataset h3 { font-size: 15px; font-weight: 700; margin: 16px 0 6px; }
.dataset p { font-size: 12.5px; color: var(--muted); line-height: 1.5; min-height: 38px; }
.dataset .tags { display: flex; gap: 6px; margin: 16px 0 18px; }
.dataset .foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border-2); }
.dataset .foot small { display: block; font-size: 11px; color: var(--muted-2); }
.dataset .foot b { font-size: 12px; font-weight: 600; color: var(--text-2); }

/* ===================== ANÁLISES ===================== */
.insight { padding: 20px; display: flex; flex-direction: column; }
.insight h3 { font-size: 14px; font-weight: 700; line-height: 1.3; margin-bottom: 14px; }
.insight .body { display: flex; align-items: center; gap: 14px; flex: 1; }
.insight .big { font-family: var(--font-head); font-size: 34px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 4px; }
.insight .big [data-lucide], .insight .big .lucide { width: 26px; height: 26px; stroke-width: 2.6; }
.insight p { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.insight .link-arrow { margin-top: 16px; }

/* ===================== FORNECEDOR (FUTURISTA & MINIMALISTA) ===================== */
.org-logo {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(235, 243, 255, 0.95), rgba(245, 250, 255, 0.8));
  color: var(--blue); border: 1px solid rgba(53, 103, 214, 0.2);
  box-shadow: 0 8px 20px -6px rgba(53, 103, 214, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.org-logo [data-lucide], .org-logo .lucide { width: 28px; height: 28px; }

/* Faixa de telemetria futurista */
.futuristic-stat-strip {
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr);
  background: linear-gradient(145deg, #ffffff, #f7faf9);
  border: 1px solid rgba(61, 220, 154, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px -10px rgba(6, 43, 34, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  overflow: hidden; position: relative;
}
.futuristic-stat-strip::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #3ddc9a, #1a8a63, #3567d6, #3ddc9a);
  background-size: 200% 100%;
  animation: glowSweep 6s linear infinite;
}
@keyframes glowSweep { 0% { background-position: 0% 0%; } 100% { background-position: 200% 0%; } }

.futuristic-stat-strip > div {
  padding: 20px 22px; border-left: 1px solid rgba(227, 235, 231, 0.8);
  position: relative; transition: background .2s var(--ease);
}
.futuristic-stat-strip > div:hover { background: rgba(61, 220, 154, 0.03); }
.futuristic-stat-strip > div:first-child {
  border-left: 0;
  background: linear-gradient(160deg, rgba(61, 220, 154, 0.08), rgba(255, 255, 255, 0.95));
}
.futuristic-stat-strip small {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted);
}
.futuristic-stat-strip b {
  display: block; font-family: var(--font-head); font-size: 25px; font-weight: 800;
  letter-spacing: -.03em; margin-top: 5px; color: var(--text);
}
.futuristic-stat-strip b span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.futuristic-stat-strip .hud-sub {
  font-size: 11px; color: #128157; margin-top: 4px; display: flex; align-items: center; gap: 4px; font-weight: 600;
}

/* Cards com design minimalista e futurista */
.future-card {
  background: #ffffff;
  border: 1px solid rgba(220, 232, 227, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px -8px rgba(10, 40, 30, 0.06);
  position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.future-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -12px rgba(13, 90, 69, 0.14);
  border-color: rgba(61, 220, 154, 0.4);
}
.future-card::after {
  content: ""; position: absolute; right: 0; top: 0; width: 40px; height: 40px;
  background: radial-gradient(circle at 100% 0%, rgba(61, 220, 154, 0.12), transparent 70%);
  pointer-events: none;
}
.future-card .card-head {
  border-bottom: 1px solid rgba(235, 242, 239, 0.9);
  padding: 16px 22px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.future-card .card-head .card-title {
  display: flex; align-items: center; gap: 8px; font-size: 14.5px;
}
.future-card .card-head .card-title::before {
  content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--mint-2);
}

/* HUD micro-badges */
.hud-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 6px;
  font-family: var(--font); font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.hud-pill.active { background: #e6f8f0; color: #10875c; border: 1px solid #bcefd8; }
.hud-pill.rating { background: #edf4fe; color: var(--blue); border: 1px solid #c9defc; }
.hud-pill.audit { background: #fdf5ea; color: var(--orange); border: 1px solid #f9e2be; }

/* Grid de métricas de performance */
.telemetry-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px;
}
.telemetry-card {
  padding: 18px; border-radius: 14px; background: #ffffff;
  border: 1px solid rgba(220, 232, 227, 0.85);
  box-shadow: 0 4px 14px -4px rgba(10, 40, 30, 0.04);
  position: relative; overflow: hidden;
}
.telemetry-card small { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.telemetry-card .big { font-family: var(--font-head); font-size: 26px; font-weight: 800; margin: 4px 0 2px; color: var(--text); }
.telemetry-card .bar { height: 4px; border-radius: 99px; background: #eef3f1; overflow: hidden; margin-top: 10px; }
.telemetry-card .bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #10875c, #3ddc9a); }

/* Document vault */
.doc-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-radius: 12px; background: #ffffff;
  border: 1px solid var(--border); transition: all .2s var(--ease);
}
.doc-item:hover {
  background: #fbfdfc; border-color: rgba(61, 220, 154, 0.5);
  transform: translateX(4px); box-shadow: 0 8px 20px -8px rgba(13, 90, 69, 0.08);
}
.doc-item-left { display: flex; align-items: center; gap: 14px; }
.doc-icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: #edf7f2; color: #10875c; flex-shrink: 0;
}
.doc-info h4 { font-size: 13.5px; font-weight: 700; margin: 0 0 3px; }
.doc-info small { font-size: 11.5px; color: var(--muted); }

/* ===================== MAPA ===================== */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 18px; }
.map-stage { position: relative; min-height: 560px; border-radius: var(--radius-lg); overflow: hidden; background: radial-gradient(60% 60% at 50% 45%, rgba(61,220,154,.18), transparent 70%), linear-gradient(160deg, #073226, #031a14); }
.map-stage .map3d { inset: 4% 10% 2% 10%; }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .detail-side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .stat-strip > div:first-child { grid-column: 1 / -1; }
  .stat-strip > div:nth-child(2), .stat-strip > div:nth-child(5) { border-left: 0; }
  .stat-strip > div { border-top: 1px solid var(--border-2); }
}
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2.even, .map-layout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; padding: 10px 24px 0; }
  .hero-map { height: 340px; }
}
@media (max-width: 760px) {
  .detail-grid, .detail-side, .grid-3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip > div:nth-child(n) { border-left: 0; }
  .milestones { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; }
  .luanda-card { left: 30%; }
}
