/* STEP54 — Assistente interno DoriSan */

.d54-section{
  position:relative;
  padding:58px 5vw 76px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,48,79,.12), transparent 33%),
    radial-gradient(circle at 100% 0%, rgba(89,183,255,.16), transparent 34%),
    linear-gradient(180deg, rgba(2,5,10,.98), rgba(5,13,29,.97));
  border-top:1px solid rgba(89,183,255,.18);
}

.d54-inner{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:24px;
  align-items:stretch;
}

.d54-card{
  overflow:hidden;
  border-radius:30px;
  border:1px solid rgba(89,183,255,.28);
  background:
    linear-gradient(135deg, rgba(255,48,79,.10), transparent 28%),
    linear-gradient(225deg, rgba(89,183,255,.13), transparent 35%),
    rgba(2,5,10,.92);
  box-shadow:0 20px 54px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.035);
}

.d54-main{
  padding:30px;
}

.d54-kicker{
  color:#f4c778;
  font-size:.78rem;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.d54-title{
  margin:10px 0 12px;
  color:#f7f9ff;
  font-size:clamp(2rem,4vw,4rem);
  line-height:.95;
  letter-spacing:-.05em;
}

.d54-text{
  color:#c9d5e8;
  line-height:1.65;
  font-weight:750;
  max-width:820px;
}

.d54-tags{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:18px;
}

.d54-tag{
  border-radius:999px;
  border:1px solid rgba(244,199,120,.32);
  background:linear-gradient(135deg, rgba(255,48,79,.16), rgba(89,183,255,.13));
  color:#fff;
  padding:8px 11px;
  font-size:.75rem;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.d54-console{
  display:grid;
  grid-template-rows:auto 1fr auto;
  min-height:430px;
}

.d54-console-head{
  padding:18px 20px;
  border-bottom:1px solid rgba(89,183,255,.18);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.d54-console-head strong{
  color:#fff;
  font-size:1.05rem;
}

.d54-led{
  color:#0d1119;
  background:linear-gradient(135deg,#f4c778,#fff0c8);
  border-radius:999px;
  padding:6px 10px;
  font-size:.68rem;
  font-weight:950;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.d54-chat{
  padding:18px;
  display:grid;
  gap:12px;
  align-content:start;
  max-height:430px;
  overflow:auto;
}

.d54-msg{
  border-radius:18px;
  padding:13px 14px;
  line-height:1.5;
  font-weight:750;
}

.d54-msg.bot{
  color:#eaf6ff;
  border:1px solid rgba(89,183,255,.22);
  background:rgba(89,183,255,.08);
}

.d54-msg.user{
  color:#fff;
  border:1px solid rgba(255,48,79,.22);
  background:rgba(255,48,79,.10);
  justify-self:end;
  max-width:86%;
}

.d54-msg-title{
  color:#f4c778;
  font-weight:950;
  margin-bottom:4px;
}

.d54-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:0 18px 14px;
}

.d54-chip{
  border:1px solid rgba(89,183,255,.28);
  background:rgba(0,0,0,.28);
  color:#f7f9ff;
  border-radius:999px;
  padding:8px 10px;
  font-weight:900;
  cursor:pointer;
}

.d54-inputrow{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:8px;
  padding:16px 18px 18px;
  border-top:1px solid rgba(89,183,255,.18);
}

.d54-input{
  min-width:0;
  border-radius:999px;
  border:1px solid rgba(89,183,255,.28);
  background:rgba(0,0,0,.30);
  color:#fff;
  padding:12px 15px;
  outline:none;
  font-weight:800;
}

.d54-btn{
  border:0;
  border-radius:999px;
  padding:12px 15px;
  cursor:pointer;
  font-weight:950;
  color:#07111f;
  background:linear-gradient(135deg,#59b7ff,#f4c778);
}

.d54-voice{
  background:linear-gradient(135deg,#ff304f,#59b7ff);
  color:white;
}

.d54-float{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:99990;
  border:1px solid rgba(244,199,120,.55);
  background:
    radial-gradient(circle at 0% 0%, rgba(255,48,79,.28), transparent 38%),
    linear-gradient(135deg, rgba(2,5,10,.95), rgba(9,31,63,.94));
  color:#fff;
  border-radius:999px;
  padding:12px 16px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
  box-shadow:0 18px 40px rgba(0,0,0,.45), 0 0 24px rgba(89,183,255,.16);
  cursor:pointer;
}

.d54-panel{
  position:fixed;
  right:18px;
  bottom:78px;
  z-index:99991;
  width:min(430px,calc(100vw - 32px));
  max-height:70vh;
  display:none;
  border-radius:24px;
  border:1px solid rgba(89,183,255,.32);
  background:rgba(2,5,10,.98);
  box-shadow:0 24px 70px rgba(0,0,0,.62);
  overflow:hidden;
}

.d54-panel.open{
  display:block;
}

.d54-panel .d54-console{
  min-height:0;
}

@media(max-width:920px){
  .d54-inner{
    grid-template-columns:1fr;
  }

  .d54-main{
    padding:24px;
  }

  .d54-inputrow{
    grid-template-columns:1fr;
  }

  .d54-btn{
    width:100%;
  }
}
