/* =============================================
   ERP AI Assistant — style.css
   Sirf UI/UX — HTML & JS unchanged
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #0d1117;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background glow blobs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
}

body::before {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(99,102,241,0.16) 0%, transparent 70%);
  top: -140px;
  right: -100px;
}

body::after {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124,58,237,0.10) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
}

/* ---- Main Container ---- */
.chat-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(14px);
  border-left: 0.5px solid rgba(255,255,255,0.07);
  border-right: 0.5px solid rgba(255,255,255,0.07);
}

/* ---- Header ---- */
.header {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #f0f0f4;
  letter-spacing: 0.01em;
  padding: 16px 22px;
  background: rgba(255,255,255,0.03);
  border-bottom: 0.5px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Logo icon before title */
.header::before {
  content: '⬡';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  border-radius: 10px;
  font-size: 18px;
  color: white;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
  flex-shrink: 0;
}

/* Online status after title */
.header::after {
  content: '● Online';
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  color: #22c55e;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.02em;
  animation: pulse-online 2.5s ease-in-out infinite;
}

@keyframes pulse-online {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ---- Chat Box ---- */
#chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
}

#chat-box::-webkit-scrollbar        { width: 4px; }
#chat-box::-webkit-scrollbar-thumb  {
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
}

/* ---- Message Bubbles ---- */
.user,
.bot,
.steps {
  animation: msg-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  max-width: 72%;
  padding: 10px 15px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.65;
  word-break: break-word;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* User message — right aligned */
.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 18px rgba(99,102,241,0.25);
}

/* Bot message — left aligned */
.bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.09);
  color: #e2e2e6;
  border-top-left-radius: 4px;
  position: relative;
}

/* "AI:" label styling inside bot bubble */
.bot strong,
.bot b {
  color: rgba(180,180,255,0.75);
  font-weight: 500;
}

/* Steps block */
.steps {
  align-self: flex-start;
  background: rgba(99,102,241,0.07);
  border: 0.5px solid rgba(99,102,241,0.2);
  color: #d4d4e8;
  border-radius: 12px;
  max-width: 80%;
}

.steps b {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(180,180,255,0.7);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.steps ul {
  padding-left: 18px;
}

.steps li {
  font-size: 13px;
  line-height: 1.7;
  color: #c8c8de;
  list-style: none;
  padding: 3px 0;
  position: relative;
}

.steps li::before {
  content: '→';
  position: absolute;
  left: -16px;
  color: rgba(99,102,241,0.6);
  font-size: 12px;
}

/* ---- Input Area ---- */
.input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 0.5px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}

/* Text input */
#message {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.11);
  border-radius: 12px;
  padding: 11px 16px;
  color: #e2e2e6;
  font-size: 13.5px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

#message::placeholder {
  color: rgba(255,255,255,0.2);
}

#message:focus {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.04);
}

/* Send button */
button {
  padding: 11px 22px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-size: 13.5px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
  letter-spacing: 0.01em;
}

button:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
}

button:active {
  transform: scale(0.96);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .chat-container {
    max-width: 100%;
    border: none;
  }
  .user, .bot { max-width: 85%; }
  .steps      { max-width: 92%; }
}
.bot.typing::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}