/* ====== Profile UI (tabs + overview) ====== */

.ementis-ui .ementis-profile-tabs{
  display:flex;
  gap:10px;
  padding:12px 16px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#fff;
  flex-wrap:wrap;
}

.ementis-ui .ementis-tab{
  appearance:none;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:999px;
  padding:8px 12px;
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  transition: transform .05s ease, border-color .15s ease, box-shadow .15s ease;
}

.ementis-ui .ementis-tab:hover{ border-color:#d1d5db; }
.ementis-ui .ementis-tab:active{ transform: translateY(1px); }

.ementis-ui .ementis-tab.active{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47,93,80,.12);
}

.ementis-ui .ementis-profile-panel{
  padding: 14px 16px;
  background: #fff;
}

/* ===============================
   OVERVIEW
================================ */

.ementis-ui .ementis-overview{
  padding: 16px;
  background: #fff;
}

.ementis-ui .ementis-overview-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 18px;
}

@media (max-width: 1000px){
  .ementis-ui .ementis-overview-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .ementis-ui .ementis-overview-grid{ grid-template-columns: 1fr; }
}

.ementis-ui .ementis-overview-card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ementis-ui .ov-title{
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .02em;
}

.ementis-ui .ov-value{
  margin-top: 8px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}

.ementis-ui .ov-unit{
  font-size: 16px;
  font-weight: 700;
  margin-left: 4px;
  color: var(--muted);
}

.ementis-ui .ov-sub{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Action card */
.ementis-ui .ementis-overview-action{
  background: linear-gradient(
    135deg,
    rgba(47,93,80,0.08),
    rgba(47,93,80,0.02)
  );
  border-style: dashed;
  align-items: flex-start;
  gap: 10px;
  justify-content: flex-start;
}

/* Trend badge (gor/dol) */
.ementis-ui .ementis-kpi-trend{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top: 0;
  margin-bottom: 10px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
}

.ementis-ui .ementis-kpi-trend .trend-ico{
  font-weight: 900;
}

.ementis-ui .ementis-kpi-trend.up{
  background: rgba(6,95,70,.08);
  border-color: rgba(6,95,70,.25);
  color:#065f46;
}
.ementis-ui .ementis-kpi-trend.down{
  background: rgba(153,27,27,.08);
  border-color: rgba(153,27,27,.25);
  color:#991b1b;
}
.ementis-ui .ementis-kpi-trend.flat{
  background: rgba(146,64,14,.08);
  border-color: rgba(146,64,14,.25);
  color:#92400e;
}

/* Chart card */
.ementis-ui .ementis-overview-chartcard{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.ementis-ui .chart-head{
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.ementis-ui .chart-title{
  font-size: 14px;
  font-weight: 900;
}

.ementis-ui .chart-sub{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.ementis-ui .ementis-profile-chart{
  width: 100%;
  display: block;
  padding: 12px 14px 10px 14px;
}

/* Status message polish */
.ementis-ui .ementis-profile-msg{
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  margin-top: 2px;
}
.ementis-ui .ementis-profile-msg.ok{ color:#065f46; }
.ementis-ui .ementis-profile-msg.err{ color:#991b1b; }
.ementis-ui .ementis-profile-msg.warn{ color:#92400e; }
.ementis-ui .ementis-profile-msg.loading{ color:#1f2937; }

/* TEXT VIEW */
.ementis-ui .ementis-profile-body{ padding: 0; }

.ementis-ui .ementis-profile-pre{
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

/* status line minor polish */
.ementis-ui .ementis-profile-err{
  color:#991b1b;
  font-weight:700;
  margin-left:6px;
}

