.ai-insight-launch-button{
  width:auto;
  min-width:112px;
  color:#fff;
  background:linear-gradient(135deg,#ff6a00,#e95400);
  border:1px solid rgba(255,177,95,.60);
  box-shadow:0 8px 22px rgba(255,106,0,.20);
}

.ai-insight-launch-button:hover{
  background:linear-gradient(135deg,#ff7a12,#ff5a00);
  border-color:rgba(255,215,176,.85);
}

.ai-insight-backdrop{
  position:fixed;
  inset:0;
  z-index:4200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.76);
  backdrop-filter:blur(9px);
}

.ai-insight-backdrop.hidden{
  display:none;
}

.ai-insight-modal{
  width:min(1040px,100%);
  max-height:min(88dvh,900px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  color:#f5f5f5;
  background:
    radial-gradient(circle at 100% 0,rgba(255,106,0,.10),transparent 32%),
    #111;
  border:1px solid rgba(255,255,255,.13);
  border-radius:20px;
  box-shadow:0 28px 80px rgba(0,0,0,.58);
}

.ai-insight-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:18px 20px 15px;
  border-bottom:1px solid rgba(255,255,255,.10);
}

.ai-insight-eyebrow{
  margin-bottom:4px;
  color:#ff9a3d;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.10em;
}

.ai-insight-top h2{
  margin:0;
  color:#fff;
  font-size:22px;
}

.ai-insight-top p{
  margin:5px 0 0;
  color:rgba(245,245,245,.60);
  font-size:12px;
}

.ai-insight-close{
  width:34px;
  min-width:34px;
  height:34px;
  padding:0;
  display:grid;
  place-items:center;
  color:rgba(245,245,245,.72);
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  font-size:21px;
  line-height:1;
}

.ai-insight-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 20px;
  background:rgba(255,255,255,.018);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.ai-insight-modes{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.ai-insight-mode{
  width:auto;
  min-width:0;
  padding:8px 11px;
  color:rgba(245,245,245,.65);
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.10);
  border-radius:9px;
  font-size:11px;
  font-weight:850;
}

.ai-insight-mode.active{
  color:#fff;
  background:rgba(255,106,0,.16);
  border-color:rgba(255,106,0,.52);
  box-shadow:inset 0 0 0 1px rgba(255,177,95,.10);
}

.ai-insight-refresh{
  width:auto;
  min-width:92px;
  padding:8px 11px;
  color:#ffb15f;
  background:rgba(255,106,0,.07);
  border:1px solid rgba(255,106,0,.30);
  border-radius:9px;
  font-size:11px;
}

.ai-insight-content{
  min-height:330px;
  overflow:auto;
  padding:18px 20px 20px;
}

.ai-insight-loading{
  min-height:320px;
  display:grid;
  place-items:center;
  text-align:center;
}

.ai-insight-spinner{
  width:42px;
  height:42px;
  margin:0 auto 13px;
  border:3px solid rgba(255,255,255,.10);
  border-top-color:#ff7a12;
  border-radius:50%;
  animation:aiInsightSpin .85s linear infinite;
}

@keyframes aiInsightSpin{
  to{transform:rotate(360deg)}
}

.ai-insight-loading strong{
  display:block;
  color:#fff;
  font-size:15px;
}

.ai-insight-loading span{
  display:block;
  margin-top:5px;
  color:rgba(245,245,245,.55);
  font-size:11px;
}

.ai-insight-summary{
  padding:14px 16px;
  background:rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.10);
  border-left:4px solid #94a3b8;
  border-radius:12px;
}

.ai-insight-summary.low{border-left-color:#22c55e}
.ai-insight-summary.medium{border-left-color:#f59e0b}
.ai-insight-summary.high{border-left-color:#ef4444}

.ai-insight-summary-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.ai-insight-summary h3{
  margin:0;
  color:#fff;
  font-size:16px;
}

.ai-insight-risk{
  padding:4px 8px;
  color:rgba(245,245,245,.76);
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.ai-insight-summary p{
  margin:8px 0 0;
  color:rgba(245,245,245,.70);
  font-size:12px;
  line-height:1.55;
}

.ai-insight-highlights{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-top:12px;
}

.ai-insight-highlight{
  padding:11px 12px;
  background:rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.09);
  border-radius:11px;
}

.ai-insight-highlight.good{border-color:rgba(34,197,94,.30)}
.ai-insight-highlight.watch{border-color:rgba(245,158,11,.34)}
.ai-insight-highlight.risk{border-color:rgba(239,68,68,.38)}

.ai-insight-highlight span{
  display:block;
  color:rgba(245,245,245,.50);
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.ai-insight-highlight strong{
  display:block;
  margin-top:5px;
  color:#fff;
  font-size:19px;
  line-height:1.05;
}

.ai-insight-highlight small{
  display:block;
  margin-top:5px;
  color:rgba(245,245,245,.52);
  font-size:9px;
  line-height:1.35;
}

.ai-insight-columns{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  margin-top:12px;
}

.ai-insight-section{
  min-width:0;
  padding:13px;
  background:rgba(255,255,255,.018);
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
}

.ai-insight-section h4{
  margin:0 0 10px;
  color:rgba(245,245,245,.70);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.ai-insight-item{
  padding:10px 0;
  border-top:1px solid rgba(255,255,255,.08);
}

.ai-insight-item:first-of-type{
  padding-top:0;
  border-top:0;
}

.ai-insight-item:last-child{
  padding-bottom:0;
}

.ai-insight-item-title{
  display:flex;
  align-items:flex-start;
  gap:7px;
  color:#fff;
  font-size:12px;
  font-weight:850;
}

.ai-insight-dot{
  width:7px;
  min-width:7px;
  height:7px;
  margin-top:4px;
  background:#94a3b8;
  border-radius:50%;
}

.ai-insight-dot.watch{background:#f59e0b}
.ai-insight-dot.risk{background:#ef4444}
.ai-insight-dot.info{background:#60a5fa}
.ai-insight-dot.now{background:#ef4444}
.ai-insight-dot.next{background:#f59e0b}
.ai-insight-dot.later{background:#94a3b8}

.ai-insight-item p{
  margin:5px 0 0 14px;
  color:rgba(245,245,245,.60);
  font-size:10px;
  line-height:1.5;
}

.ai-insight-ticket-list{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin:7px 0 0 14px;
}

.ai-insight-ticket{
  width:auto;
  min-width:0;
  padding:4px 7px;
  color:#ffb15f;
  background:rgba(255,106,0,.07);
  border:1px solid rgba(255,106,0,.28);
  border-radius:6px;
  font-size:9px;
  font-weight:900;
}

.ai-insight-ticket:hover{
  color:#fff;
  background:rgba(255,106,0,.18);
}

.ai-insight-kpis{
  margin-top:12px;
}

.ai-insight-data-note{
  margin-top:12px;
  padding:9px 11px;
  color:rgba(245,245,245,.48);
  background:rgba(255,255,255,.018);
  border:1px solid rgba(255,255,255,.07);
  border-radius:9px;
  font-size:9px;
  line-height:1.45;
}

.ai-insight-error{
  min-height:260px;
  display:grid;
  place-items:center;
  text-align:center;
}

.ai-insight-error strong{
  display:block;
  color:#fecaca;
  font-size:15px;
}

.ai-insight-error p{
  max-width:520px;
  margin:7px auto 12px;
  color:rgba(245,245,245,.58);
  font-size:11px;
  line-height:1.5;
}

.ai-insight-empty{
  color:rgba(245,245,245,.48);
  font-size:10px;
}

@media(max-width:800px){
  .ai-insight-backdrop{
    align-items:flex-end;
    padding:0;
  }

  .ai-insight-modal{
    width:100%;
    max-height:94dvh;
    border-radius:18px 18px 0 0;
  }

  .ai-insight-top,
  .ai-insight-toolbar,
  .ai-insight-content{
    padding-left:14px;
    padding-right:14px;
  }

  .ai-insight-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .ai-insight-refresh{
    width:100%;
  }

  .ai-insight-highlights{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .ai-insight-columns{
    grid-template-columns:1fr;
  }
}

@media(max-width:470px){
  .ai-insight-mode{
    flex:1;
  }

  .ai-insight-summary-line{
    align-items:flex-start;
    flex-direction:column;
  }
}