/* ======================================================
   BASE + NO CLIP
====================================================== */
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

html, body {
  height: auto !important;
  min-height: 100vh;
  overflow-y: auto !important;
}

.shell {
  height: auto !important;
  min-height: 100vh;
}

.panel {
  height: auto !important;
  min-height: calc(100vh - 32px);
  overflow: visible !important;
  padding-bottom: 16px;
}

/* ------------------------------------------------------
   Bootstrap overrides (so it doesn't look "white/default")
------------------------------------------------------ */
button, input {
  font-family: inherit;
}

.table.table-dark {
  background: transparent !important;
}

.table.table-dark thead th {
  border-color: rgba(255,255,255,0.06) !important;
}

.table.table-dark td,
.table.table-dark th {
  border-color: rgba(255,255,255,0.06) !important;
}

/* ======================================================
   SECTION TITLE (match the rest of your site)
====================================================== */
.section-title{
  margin-top: 10px;
  margin-bottom: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(255,255,255,.62);
}

/* ======================================================
   TABS BAR
====================================================== */
.rtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}

.rtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.rtab i { opacity: .9; }

.rtab.active {
  background: rgba(0,170,37,0.16);
  border-color: rgba(0,170,37,0.30);
}

.rtab-spacer { flex: 1; }

/* Panels */
.rtab-panel { display: none; overflow: visible !important; }
.rtab-panel.active { display: block; }

/* ======================================================
   DARK PILL BUTTONS
====================================================== */
.btn-darkpill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  height: 38px;
  padding: 0 14px;

  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;

  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  user-select: none;

  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}

.btn-darkpill:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

.btn-darkpill:active{
  transform: translateY(1px);
  background: rgba(255,255,255,0.12);
}

.btn-darkpill i{ opacity: .9; }

.btn-darkpill:disabled{
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

/* Optional: "Primary" refresh */
.rtab-refresh{
  background: rgba(0,170,37,0.12);
  border-color: rgba(0,170,37,0.26);
}
.rtab-refresh:hover{
  background: rgba(0,170,37,0.18);
  border-color: rgba(0,170,37,0.32);
}

/* ======================================================
   KPI CARDS
====================================================== */
.kpi-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 0 12px;
}
@media (max-width: 900px){
  .kpi-row{ grid-template-columns: 1fr; }
}

.kpi-card{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.kpi-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.kpi-title{
  font-weight: 900;
  font-size: 13px;
  opacity: .95;
  display:flex;
  align-items:center;
  gap: 10px;
}

.kpi-sub{
  opacity:.7;
  font-weight:700;
  font-size: 11px;
  margin-top: 6px;
}

.kpi-value{
  font-weight: 950;
  font-size: 28px;
  letter-spacing: .2px;
  line-height: 1.05;
}

.kpi-icon{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,170,37,0.14);
  border: 1px solid rgba(0,170,37,0.28);
}

/* ======================================================
   BIG CARDS
====================================================== */
.big-card{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
  margin-top: 8px;
  overflow: visible;
}

.big-title{
  font-weight: 950;
  font-size: 16px;
  margin-bottom: 2px;
}

.big-sub{
  opacity:.7;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 10px;
}

/* ======================================================
   CHART
====================================================== */
.chart-wrap{
  height: 300px;
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px;
}
.chart-wrap canvas{
  width: 100% !important;
  height: 100% !important;
}

/* ======================================================
   TOOLBAR + TABLE
====================================================== */
.toolbar{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 10px;
  align-items: center;
}

.toolbox{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.toolbox input{
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  min-width: 240px;
  font-weight: 800;
  font-size: 13px;
}
.toolbox input::placeholder{
  color: rgba(255,255,255,0.55);
}

.count-badge{
  font-weight: 900;
  opacity: .8;
  white-space: nowrap;
  font-size: 12px;
}

.table-wrap{
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}

thead { background: rgba(255,255,255,0.06); }
th, td {
  color: #fff !important;
  vertical-align: middle !important;
}

.hide-sm { display: table-cell; }
@media (max-width: 768px){
  .hide-sm{ display:none; }
}

.muted { opacity: .7; }

/* ======================================================
   CUSTOM DROPDOWN
====================================================== */
.dd{
  position: relative;
  display: inline-flex;
  width: 100%;
}

.dd-btn{
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 280px;

  background: transparent;
  border: none;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  padding: 0;
}

.dd-menu{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 280px;
  background: rgba(15, 18, 22, 0.98);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.45);
  padding: 6px;
  display: none;
  z-index: 9999;
}

.dd.open .dd-menu{ display: block; }

.dd-item{
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 850;
  font-size: 12px;
  cursor: pointer;
}

.dd-item:hover{ background: rgba(255,255,255,0.08); }

.dd-item.active{
  background: rgba(0,170,37,0.18);
  border: 1px solid rgba(0,170,37,0.30);
}

/* ======================================================
   PAGINATION
====================================================== */
.pager{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 10px 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.06);
}

.pager-left{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btns{
  display:flex;
  align-items:center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-darkpill.pagebtn{
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  box-shadow: none;
}

.btn-darkpill.pagebtn.active{
  background: rgba(0,170,37,0.18);
  border-color: rgba(0,170,37,0.30);
}

.page-info{
  font-weight: 900;
  white-space: nowrap;
  font-size: 12px;
}

@media (max-width: 520px){
  .pager{ padding: 10px; }
  .page-info{ width: 100%; }
}

/* ======================================================
   CONSOLE TAB STYLES (more terminal-like)
====================================================== */

.console-wrap {
  /* terminal frame */
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 255, 90, 0.18);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow:
    0 18px 40px rgba(0,0,0,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}

/* subtle scanlines + vignette */
.console-wrap::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(0,0,0,0.0)),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.03) 0px,
      rgba(255,255,255,0.03) 1px,
      rgba(0,0,0,0.0) 3px,
      rgba(0,0,0,0.0) 6px
    );
  opacity: 0.22;
  mix-blend-mode: overlay;
}
.console-wrap { position: relative; }

.console-output {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.55;

  padding: 14px 16px;
  height: 420px;
  overflow-y: auto;
  overflow-x: hidden;

  background:
    radial-gradient(120% 120% at 50% 0%, rgba(0,255,90,0.06), transparent 50%),
    rgba(0, 0, 0, 0.62);

  color: rgba(210, 255, 225, 0.92);
  text-shadow: 0 0 10px rgba(0,255,90,0.08);
}

/* terminal scrollbar */
.console-output::-webkit-scrollbar { width: 8px; }
.console-output::-webkit-scrollbar-track { background: rgba(0,0,0,0.35); }
.console-output::-webkit-scrollbar-thumb {
  background: rgba(0,255,90,0.18);
  border-radius: 6px;
  border: 1px solid rgba(0,255,90,0.20);
}
.console-output::-webkit-scrollbar-thumb:hover { background: rgba(0,255,90,0.28); }

.console-line {
  display: flex;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0,255,90,0.08);
  animation: console-fade-in 0.18s ease;
}

@keyframes console-fade-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* “new” glow, but still terminal-ish */
.console-line-new {
  background: rgba(0, 255, 90, 0.06);
  margin: 0 -16px;
  padding: 4px 16px;
  box-shadow: inset 0 0 0 1px rgba(0,255,90,0.10);
}

/* terminal timestamp */
.console-time {
  color: rgba(0,255,90,0.55);
  font-weight: 800;
  white-space: nowrap;
  min-width: 92px;
  letter-spacing: 0.2px;
}

/* add prompt prefix */
.console-time::before{
  content: "> ";
  color: rgba(0,255,90,0.35);
  font-weight: 900;
}

.console-content {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

/* name like command */
.console-content strong {
  color: rgba(230, 255, 240, 0.95);
  font-weight: 900;
}

/* rid chip -> terminal tag */
.console-content code {
  background: rgba(0,255,90,0.08);
  padding: 1px 8px;
  border-radius: 6px;
  color: rgba(0,255,120,0.92);
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(0,255,90,0.12);
}

/* meta text */
.console-meta {
  color: rgba(210,255,225,0.62);
  font-size: 12px;
}

/* badge -> terminal label */
.console-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.console-badge-new {
  background: rgba(0,255,90,0.12);
  border: 1px solid rgba(0,255,90,0.22);
  color: rgba(0,255,120,0.92);
}

/* error: terminal red */
.console-error {
  background: rgba(255, 60, 60, 0.06) !important;
  border-bottom: 1px dashed rgba(255, 60, 60, 0.16);
}
.console-error .console-time { color: rgba(255, 120, 120, 0.85); }
.console-error .console-time::before { color: rgba(255, 120, 120, 0.55); }
.console-error .console-content { color: rgba(255, 170, 170, 0.95); }
.console-error .console-content code {
  background: rgba(255, 60, 60, 0.10);
  border-color: rgba(255, 60, 60, 0.18);
  color: rgba(255, 190, 190, 0.95);
}

/* empty state -> terminal message */
.console-empty {
  text-align: left;
  padding: 18px 4px;
  color: rgba(0,255,90,0.55);
  font-weight: 900;
  font-size: 12px;
}
.console-empty::before{
  content: "$ tail -f activity.log\n";
  white-space: pre;
  display:block;
  color: rgba(0,255,90,0.38);
  margin-bottom: 10px;
}

/* status bar like terminal footer */
.console-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(0,255,90,0.14);
  gap: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 900;
  color: rgba(210, 255, 225, 0.80);
}

.status-pulse {
  color: rgba(0, 255, 90, 0.95);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.console-counter {
  font-size: 11.5px;
  font-weight: 900;
  color: rgba(210, 255, 225, 0.60);
}

/* Auto-scroll checkbox: terminal compact */
.console-checkbox-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.custom-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0,255,90,0.28);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.custom-checkbox:checked {
  background: rgba(0,255,90,0.14);
  border-color: rgba(0,255,90,0.55);
}

.custom-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0,255,120,0.95);
  font-size: 12px;
  font-weight: 900;
}

.custom-checkbox:hover {
  border-color: rgba(0,255,90,0.45);
}

.checkbox-label {
  opacity: 0.9;
  font-size: 12px;
  font-weight: 900;
  margin: 0;
  white-space: nowrap;
  color: rgba(210, 255, 225, 0.92);
}

/* Responsive adjustments for console */
@media (max-width: 768px) {
  .console-output {
    height: 350px;
    font-size: 12px;
    padding: 12px;
  }

  .console-time {
    min-width: 84px;
    font-size: 11px;
  }

  .console-line-new {
    margin: 0 -12px;
    padding: 4px 12px;
  }
}

/* ======================================================
   ✅ ADVANCED ANALYTICS
====================================================== */
.kpi-row-3{
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 1100px){
  .kpi-row-3{ grid-template-columns: 1fr; }
}

.split-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 1000px){
  .split-grid{ grid-template-columns: 1fr; }
}

.adv-lists{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}
@media (max-width: 900px){
  .adv-lists{ grid-template-columns: 1fr; }
}

.adv-list{
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px;
}

.adv-list-title{
  font-weight: 950;
  font-size: 13px;
  margin-bottom: 8px;
  opacity: .92;
}

.adv-item{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
  font-weight: 850;
  font-size: 12px;
}
.adv-item:last-child{ border-bottom: none; }

.adv-item code{
  background: rgba(0,170,37,0.12);
  border: 1px solid rgba(0,170,37,0.20);
  color: rgba(180,255,200,0.95);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 11px;
}
.adv-item small{
  opacity: .70;
  font-weight: 800;
  white-space: nowrap;
}

/* =========================================
   zmtlabs-style hint (tooltip icon)
========================================= */
.hint{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  margin-left: 8px;

  border-radius: 999px;
  background: rgba(0,170,37,0.10);
  border: 1px solid rgba(0,170,37,0.26);

  color: rgba(0,255,90,0.95);
  opacity: .9;

  cursor: help;
  user-select: none;

  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
  transition: transform .08s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
}

.hint i{
  font-size: 12px;
  opacity: .95;
}

.hint:hover{
  opacity: 1;
  background: rgba(0,170,37,0.16);
  border-color: rgba(0,170,37,0.34);
  transform: translateY(-1px);
}

.hint:active{
  transform: translateY(0px);
}

/* Optional: better native title UX on some browsers */
.hint[title]{ position: relative; }

/* Right stacked cards */
.stack-col{
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* Grid inside info cards */
.info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:10px;
}

/* Single info tile */
.info-item{
  padding:12px 12px;
  border-radius:14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

/* Label */
.info-label{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:700;
  letter-spacing: .2px;
  opacity:.75;
  text-transform:uppercase;
}

/* Main number/text */
.info-value{
  margin-top:6px;
  font-size:22px;
  font-weight:800;
  line-height:1.1;
  color: rgba(230,255,240,0.95);
}

/* Subline (date etc) */
.info-sub{
  margin-top:6px;
  font-size:12px;
  font-weight:700;
  opacity:.65;
}

/* Small pill style for status if you want */
.info-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(0,170,37,0.12);
  border: 1px solid rgba(0,170,37,0.22);
  font-size:12px;
  font-weight:800;
}

/* Status colors */
.info-pill.is-live{
  background: rgba(0,170,37,0.14);
  border-color: rgba(0,170,37,0.28);
}
.info-pill.is-recent{
  background: rgba(255,183,0,0.14);
  border-color: rgba(255,183,0,0.28);
}
.info-pill.is-idle{
  background: rgba(255,70,70,0.12);
  border-color: rgba(255,70,70,0.26);
}

/* make it 1 column on small screens */
@media (max-width: 900px){
  .info-grid{ grid-template-columns: 1fr; }
}
