* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background: #f6f8fa;
  color: #1e293b;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* main card – glass‑morphic */
.assistant-card {
  max-width: 1360px;
  width: 100%;
  height: 90vh;
  max-height: 850px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 40px;
  box-shadow:
    0 25px 60px -15px rgba(0, 80, 50, 0.25),
    0 0 0 1px rgba(0, 180, 120, 0.1);
  display: flex;
  overflow: hidden;
  transition: all 0.2s ease;
}

/* side panel */
.side-panel {
  width: 300px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-right: 1px solid rgba(0, 200, 120, 0.15);
  display: flex;
  flex-direction: column;
  padding: 28px 0 20px 0;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 200;
}

.brand {
  padding: 0 24px 24px 24px;
  border-bottom: 1px solid rgba(46, 204, 113, 0.2);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(145deg, #2ecc71, #1e8b4c);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 10px 18px -8px #2ecc7150;
}

.brand h2 {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  background: linear-gradient(130deg, #0f2b1d, #1b4d2e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand .badge {
  font-size: 0.8rem;
  background: rgba(46, 204, 113, 0.12);
  color: #0f5c2e;
  padding: 5px 12px;
  border-radius: 40px;
  display: inline-block;
  font-weight: 500;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.nav-links {
  flex: 1;
  padding: 28px 16px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 18px;
  font-weight: 500;
  color: #334155;
  transition: 0.18s;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 1.3rem;
  width: 28px;
  color: #2ecc71;
}

.nav-item.active {
  background: white;
  border-color: rgba(46, 204, 113, 0.3);
  box-shadow: 0 6px 14px rgba(0, 80, 40, 0.06);
  color: #0b4121;
  font-weight: 600;
}

.nav-item:not(.active):hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(46, 204, 113, 0.2);
}

.side-footer {
  padding: 24px 24px 0 24px;
  font-size: 0.75rem;
  color: #5b6e7e;
  border-top: 1px dashed rgba(0, 0, 0, 0.05);
}
.side-footer p {
  margin-bottom: 6px;
}

/* main chat area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.chat-header {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.assistant-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #2ecc71, #1e8749);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  box-shadow: 0 16px 24px -8px #2ecc7180;
}
.status h3 {
  font-size: 1.3rem;
  font-weight: 600;
}
.status p {
  color: #2ecc71;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.status p i {
  font-size: 0.6rem;
  color: #2ecc71;
}

.header-actions {
  display: flex;
  gap: 12px;
}
.icon-btn {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.04);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2e4053;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 6px 14px rgba(0, 20, 0, 0.02);
}
.icon-btn:hover {
  border-color: #2ecc71;
  color: #1e7e44;
  transform: scale(1.02);
}

/* messages */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}
.message {
  display: flex;
  gap: 16px;
  max-width: 80%;
  animation: fadeUp 0.3s ease;
}
.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.msg-avatar {
  width: 42px;
  height: 42px;
  background: #e6edf2;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e3b4f;
  flex-shrink: 0;
}
.bot .msg-avatar {
  background: #def5e5;
  color: #0f7336;
}
.msg-content {
  background: white;
  padding: 18px 20px;
  border-radius: 26px 26px 26px 10px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.02);
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid rgba(0, 0, 0, 0.02);
}
.user .msg-content {
  background: #2ecc71;
  color: white;
  border-radius: 26px 26px 10px 26px;
}
.msg-content p {
  margin-bottom: 8px;
}
.msg-content p:last-child {
  margin-bottom: 0;
}

/* quick chips with icons */
.quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.quick-chip {
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.2);
  padding: 10px 18px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #166534;
  cursor: pointer;
  transition: 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.quick-chip i {
  font-size: 1rem;
  color: #2ecc71;
}
.quick-chip:hover {
  background: #2ecc7120;
}

/* product card with image placeholder */
.product-mini-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product-mini-item {
  background: #fafcfb;
  border-radius: 24px;
  padding: 16px;
  border-left: 5px solid #2ecc71;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  gap: 16px;
}
.product-img-placeholder {
  width: 56px;
  height: 56px;
  background: linear-gradient(145deg, #e2f0e8, #cee6db);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e6e3b;
  font-size: 24px;
  flex-shrink: 0;
}
.product-info {
  flex: 1;
}
.product-info strong {
  font-size: 1rem;
  display: block;
}
.product-info span {
  color: #2ecc71;
  font-weight: 500;
  font-size: 0.85rem;
}

.warranty-block {
  background: #f0fbf4;
  padding: 18px;
  border-radius: 24px;
  margin: 8px 0;
}
.warranty-block i {
  color: #2ecc71;
  margin-right: 8px;
}

/* input */
.input-footer {
  padding: 20px 32px 28px 32px;
  background: transparent;
}
.input-wrapper {
  background: white;
  border-radius: 80px;
  padding: 4px 4px 4px 24px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 6px 24px rgba(0, 70, 30, 0.06);
}
.input-wrapper input {
  flex: 1;
  border: none;
  padding: 16px 6px 16px 0;
  font-size: 1rem;
  background: transparent;
  outline: none;
}
.send-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #2ecc71;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: 0 6px 16px #2ecc7160;
}
.send-btn:hover {
  background: #259e58;
  transform: scale(0.98);
}

/* modal (floating) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 30, 10, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  background: white;
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  border-radius: 36px;
  box-shadow: 0 40px 80px -20px #0f4229;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid #eef5f1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #1c3f2c;
}
.modal-close {
  background: #f1f5f9;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
}
.modal-body {
  padding: 28px;
  overflow-y: auto;
}
.modal-section {
  margin-bottom: 30px;
}
.modal-section h3 {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.faq-item {
  border-bottom: 1px solid #e6ede9;
  padding: 16px 0;
  cursor: pointer;
}
.faq-question {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}
.faq-answer {
  padding-top: 12px;
  color: #3b5a4b;
  display: none;
}
.faq-item.open .faq-answer {
  display: block;
}
.download-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.down-item {
  background: #f6fcf9;
  padding: 18px;
  border-radius: 24px;
  flex: 1 1 160px;
  text-align: center;
  border: 1px solid #d0f0de;
  cursor: pointer;
}

/* mobile adaptations */
@media (max-width: 720px) {
  .assistant-card {
    border-radius: 28px;
    height: 95vh;
  }
  .side-panel {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 300;
    transform: translateX(-100%);
    border-radius: 28px 0 0 28px;
    box-shadow: none;
  }
  .side-panel.mobile-open {
    transform: translateX(0);
    box-shadow: 20px 0 40px rgba(0, 40, 0, 0.2);
  }
  /* close button only inside side panel on mobile */
  .mobile-close-btn {
    display: flex;
    position: absolute;
    top: 24px;
    right: 20px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #1e3b4f;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    z-index: 310;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  }
  .chat-header {
    padding: 16px 20px;
  }
  .messages-container {
    padding: 20px;
  }
  .message {
    max-width: 90%;
  }
  .input-footer {
    padding: 16px 20px;
  }
}

/* desktop: hide mobile close button & mobile toggle (bars) */
@media (min-width: 721px) {
  #toggleSideMobile {
    display: none;
  }
  .mobile-close-btn {
    display: none !important;
  }
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
}
