/* ============================================================
   Interactive Demo — navigable BinGest mock
   ============================================================ */

.idemo {
  --idemo-sidebar: 232px;
  position: relative;
  display: grid;
  grid-template-columns: var(--idemo-sidebar) 1fr;
  background: #FBFCFE;
  border-radius: 16px;
  overflow: hidden;
  color: #0B132A;
  font-size: 13.5px;
  border: 1px solid #E3E7EF;
  box-shadow: 0 1px 0 rgba(15,26,58,.04), 0 30px 80px -25px rgba(15,26,58,.25);
  min-height: 720px;
}

/* Sidebar */
.idemo-side {
  background: #0D1A3A;
  color: #E6ECFA;
  padding: 18px 14px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.idemo-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 18px;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}
.idemo-nav { display: flex; flex-direction: column; gap: 2px; }
.idemo-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #E6ECFA;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  transition: background .15s ease, color .15s ease;
  width: 100%;
}
.idemo-nav-item:hover {
  background: rgba(255,255,255,.06);
}
.idemo-nav-item.is-active {
  background: #2A5BFF;
  color: #fff;
}
.idemo-nav-item.is-active:hover { background: #2A5BFF; }
.idemo-nav-sub {
  margin-left: 30px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: #8C97B8;
}
.idemo-side-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: #8C97B8;
  padding: 8px;
}

/* Main */
.idemo-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
.idemo-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid #E3E7EF;
  background: #fff;
}
.idemo-crumbs { font-size: 13.5px; color: #5C6680; font-weight: 500; }
.idemo-user {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid #E3E7EF;
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
}
.idemo-avatar {
  width: 26px; height: 26px; border-radius: 999px;
  background: #2A5BFF; color: #fff;
  display: grid; place-items: center;
  font-weight: 600; font-size: 11px;
}

.idemo-body {
  padding: 28px 32px;
  background: #FBFCFE;
  flex: 1;
  overflow: hidden;
}

/* Page transition */
.idemo-page {
  animation: idemo-page-in .35s ease both;
}
@keyframes idemo-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Page header */
.idemo-h1 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0;
  color: #0B132A;
}
.idemo-h1-sub { font-size: 13px; color: #5C6680; margin-top: 4px; }

.idemo-page-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}

/* Generic action button */
.idemo-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: #2A5BFF; color: #fff;
}
.idemo-btn:hover { background: #1E4FD8; }
.idemo-btn.ghost {
  background: #fff; color: #0B132A; border-color: #E3E7EF;
}
.idemo-btn.ghost:hover { background: #F1F3F8; }
.idemo-btn.dark { background: #0B132A; color: #fff; }
.idemo-btn.dark:hover { background: #1F2740; }

/* Filter chip */
.idemo-filter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff; border: 1px solid #E3E7EF;
  font-size: 12.5px; color: #5C6680;
  cursor: pointer;
}
.idemo-filter:hover { border-color: #C9D1E0; }

.idemo-filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}

/* Table */
.idemo-table {
  background: #fff;
  border: 1px solid #E3E7EF;
  border-radius: 12px;
  overflow: hidden;
}
.idemo-thead {
  display: grid;
  padding: 12px 16px;
  background: #FBFCFE;
  border-bottom: 1px solid #E3E7EF;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #5C6680;
}
.idemo-trow {
  display: grid;
  padding: 14px 16px;
  border-bottom: 1px solid #EEF0F5;
  font-size: 13px;
  align-items: center;
  transition: background .12s;
}
.idemo-trow:last-child { border-bottom: none; }
.idemo-trow:hover { background: #FBFCFE; }
.idemo-trow .num { font-variant-numeric: tabular-nums; }
.idemo-trow .green { color: #16A34A; }
.idemo-trow .red { color: #DC2626; }
.idemo-trow .muted { color: #5C6680; }

/* Tags / badges */
.idemo-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
}
.idemo-tag.blue { background: #E9F0FE; color: #1E4FD8; }
.idemo-tag.green { background: #D1FAE5; color: #15803D; }
.idemo-tag.amber { background: #FEF3C7; color: #B45309; }
.idemo-tag.purple { background: #ECE7F6; color: #5E45A5; }
.idemo-tag.red { background: #FEE2E2; color: #B91C1C; }
.idemo-tag.gray { background: #F1F3F8; color: #5C6680; }
.idemo-tag .dot { width: 5px; height: 5px; border-radius: 999px; background: currentColor; }

/* KPI card variations for Visão Geral */
.idemo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.idemo-kpi-card {
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff; border: 1px solid #E3E7EF;
}
.idemo-kpi-card.tint-green { background: #ECFDF5; border-color: #BCEAD4; }
.idemo-kpi-card.tint-blue  { background: #EEF3FF; border-color: #D7E2FA; }
.idemo-kpi-card.tint-red   { background: #FEF2F2; border-color: #FBD3D3; }
.idemo-kpi-label { font-size: 11.5px; color: #5C6680; margin-bottom: 6px; }
.idemo-kpi-val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.idemo-kpi-card.tint-green .idemo-kpi-val { color: #15803D; }
.idemo-kpi-card.tint-blue  .idemo-kpi-val { color: #1E4FD8; }
.idemo-kpi-card.tint-red   .idemo-kpi-val { color: #B91C1C; }
.idemo-kpi-sub { font-size: 11px; color: #5C6680; margin-top: 4px; }

/* Tabs (sub-navigation) */
.idemo-tabs {
  display: flex; gap: 0; border-bottom: 1px solid #E3E7EF;
  margin-bottom: 22px;
}
.idemo-tab {
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13.5px; font-weight: 500;
  color: #5C6680;
  cursor: pointer;
  margin-bottom: -1px;
}
.idemo-tab.is-active { color: #0B132A; font-weight: 600; border-bottom-color: #0B132A; }
.idemo-tab:hover { color: #0B132A; }

/* Pulse cursor indicator (first-time hint) */
.idemo-hint {
  position: absolute;
  z-index: 5;
  pointer-events: none;
}
.idemo-hint-pulse {
  width: 14px; height: 14px; border-radius: 999px;
  background: #2A5BFF;
  box-shadow: 0 0 0 0 rgba(42,91,255,.6);
  animation: hotspot-pulse 1.4s ease-out infinite;
}
.idemo-hint-tag {
  position: absolute; left: 22px; top: -2px;
  background: #0B132A; color: #fff;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.4);
}
.idemo-hint-tag::before {
  content: ""; position: absolute; left: -5px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  border-right: 5px solid #0B132A;
}

/* Toast */
.idemo-toast {
  position: absolute; bottom: 20px; right: 24px;
  background: #0B132A; color: #fff;
  padding: 10px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 14px 28px -12px rgba(0,0,0,.4);
  animation: idemo-toast .25s ease both, idemo-toast-out .25s ease 2.6s forwards;
  z-index: 10;
}
@keyframes idemo-toast {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes idemo-toast-out {
  to { opacity: 0; transform: translateY(8px); }
}

/* Cards (Obras) */
.idemo-card {
  background: #fff; border: 1px solid #E3E7EF;
  border-radius: 12px;
  padding: 18px 20px;
  max-width: 480px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.idemo-card:hover { border-color: #2A5BFF; transform: translateY(-1px); }
.idemo-card-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.idemo-card-meta { display: flex; gap: 12px; align-items: center; font-size: 12.5px; color: #5C6680; margin-bottom: 14px; }
.idemo-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid #EEF0F5;
  font-size: 12.5px;
}

/* Responsive */
@media (max-width: 900px) {
  .idemo { grid-template-columns: 64px 1fr; font-size: 12px; }
  .idemo-brand span { display: none; }
  .idemo-nav-item span { display: none; }
  .idemo-nav-sub { display: none; }
  .idemo-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .idemo-body { padding: 18px 16px; }
}
