/* การ์ดประกาศ — แถบวิเคราะห์ AI แบบย่อ */
.pd-ai-teaser{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#fff;
  border:1px solid #e2e8f0;
  box-shadow:0 1px 3px rgba(15,23,42,.04);
}
.pd-ai-teaser-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
}
.pd-ai-teaser-brand{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.pd-ai-teaser-ico{
  font-size:16px;
  line-height:1;
  flex-shrink:0;
}
.pd-ai-teaser-ico--aui{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:24px;
  padding:0 8px;
  border-radius:999px;
  background:#fff;
  border:1px solid #d1d5db;
  box-shadow:0 1px 2px rgba(15,23,42,.06);
  font-size:11px;
  font-weight:900;
  letter-spacing:.1em;
  color:#111827;
}
.pd-ai-teaser .pd-kpi-grid{
  margin:8px 0 0;
  gap:8px;
}
.pd-ai-teaser .pd-kpi-card{
  padding:10px 10px 9px;
  border-radius:12px;
}
.pd-ai-teaser .pd-kpi-val{
  font-size:22px;
  margin-top:6px;
}
.pd-ai-teaser .pd-kpi-delta{
  display:none;
}
.pd-ai-teaser-lines{
  margin-top:8px;
}
.pd-ai-teaser-badge{
  font-size:15px;
  font-weight:900;
  color:#1e293b;
  white-space:nowrap;
}
.pd-ai-teaser-score{
  flex-shrink:0;
  font-size:14px;
  font-weight:900;
  color:#fff;
  background:linear-gradient(135deg,#3b82f6,#2563eb);
  padding:2px 7px;
  border-radius:999px;
  line-height:1.35;
}
.pd-ai-teaser-toggle{
  flex-shrink:0;
  border:0;
  background:linear-gradient(135deg,#3b82f6,#2563eb);
  border-radius:999px;
  padding:6px 14px;
  font-size:14px;
  font-weight:900;
  color:#fff;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(37,99,235,.25);
}
.pd-ai-teaser-toggle:hover{
  filter:brightness(1.05);
}
.pd-ai-teaser-lines{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.pd-ai-teaser-line{
  margin:0;
  font-size:15px;
  font-weight:800;
  color:#1e293b;
  line-height:1.5;
}
.pd-ai-teaser-line--sub{
  font-size:14px;
  font-weight:700;
  color:#64748b;
}
.pd-ai-none{
  margin:0;
  font-size:11px;
  font-weight:650;
  color:#94a3b8;
  line-height:1.5;
}
.pd-ai-modal-section{
  margin-top:12px;
  padding:0;
  border-radius:0;
  border:none;
  background:transparent;
}
.pd-ai-modal-section .pd-aidash{
  border:1px solid #e2e8f0;
}

/* Popup dashboard */
html.pd-ai-dash-open{
  overflow:hidden;
}
.pd-ai-dash-modal{
  position:fixed;
  inset:0;
  z-index:60000;
  display:none;
  align-items:flex-end;
  justify-content:center;
  padding:0;
}
.pd-ai-dash-modal.show{
  display:flex;
}
.pd-ai-dash-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.5);
  backdrop-filter:blur(3px);
}
.pd-ai-dash-sheet{
  position:relative;
  width:100%;
  max-width:520px;
  max-height:min(96vh,900px);
  display:flex;
  flex-direction:column;
  border-radius:20px 20px 0 0;
  background:#f4f7f9;
  box-shadow:0 -8px 40px rgba(15,23,42,.18);
  animation:pdAiDashIn .28s ease;
}
@media (min-width:520px){
  .pd-ai-dash-modal{
    align-items:center;
    padding:16px;
  }
  .pd-ai-dash-sheet{
    border-radius:20px;
    max-height:min(88vh,820px);
    box-shadow:0 20px 60px rgba(15,23,42,.22);
    animation:pdAiDashInDesk .28s ease;
  }
}
@keyframes pdAiDashIn{
  from{ transform:translateY(100%); opacity:.6; }
  to{ transform:translateY(0); opacity:1; }
}
@keyframes pdAiDashInDesk{
  from{ transform:translateY(16px) scale(.98); opacity:.6; }
  to{ transform:translateY(0) scale(1); opacity:1; }
}
.pd-ai-dash-sheet-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px 10px;
  flex-shrink:0;
}
.pd-ai-dash-sheet-title{
  font-size:20px;
  font-weight:900;
  color:#1e293b;
}
.pd-ai-dash-close{
  width:38px;
  height:38px;
  border:0;
  border-radius:999px;
  background:#fff;
  color:#64748b;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 1px 4px rgba(15,23,42,.08);
}
.pd-ai-dash-close:hover{
  background:#f8fafc;
  color:#334155;
}
.pd-ai-dash-sheet-body{
  flex:1;
  overflow:auto;
  padding:0 16px 20px;
  -webkit-overflow-scrolling:touch;
}
.pd-ai-dash-sheet-body .pd-aidash{
  border:none;
  padding:0;
  background:transparent;
}
.pd-dash-in-sheet{
  margin:0 0 16px;
  padding:0 0 14px;
  border-bottom:1px solid #e2e8f0;
}
.pd-dash-in-sheet .pd-dash{
  padding:4px 0 0;
  min-height:0;
  background:transparent;
}
.pd-dash-in-sheet .pd-cols{
  grid-template-columns:1fr;
  gap:12px;
}
.pd-dash-in-sheet .pd-col-head h2{
  font-size:18px;
}
.pd-aidash-robot{
  font-size:13px;
  font-weight:900;
  letter-spacing:.1em;
  color:#111827;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:6px 8px;
  line-height:1;
}
