html {
    scrollbar-gutter: stable;
}


.ai-chatroom-right,
.ai-history-list,
.ai-receipt-card,
.ai-receipt-body,
.ai-receipt-row,
.ai-receipt-value {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.ai-receipt-value,
.ai-receipt-value *,
.ai-history-list button,
.ai-history-list button * {
    overflow-wrap: anywhere;
    word-break: break-all;
}

.ai-receipt-row {
    overflow: hidden;
}

.ai-receipt-value {
    overflow: hidden;
}
   


.ai-receipt-total {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.ai-receipt-total .ai-receipt-value {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
}

/* ========================================
   AI ¼¼±Ý°è»ê¼­ ¹ßÇà º£Å¸ ¹è³Ê - ÀÌ¹ÌÁö ±âÁØ Á¤¹Ð ¸ÅÄª
======================================== */
/* NEW ¹îÁö */
.ai-tax-new-badge {
  position: static !important; /* ±¸¼®À¸·Î ³¯¾Æ°¡´Â absolute ÇØÁ¦ */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  padding: 3px 7px !important;
  border-radius: 4px !important;
  height: 18px !important;
  line-height: 1 !important;
  margin-left: 8px !important; 
  animation: newBadgePulse 2s ease-in-out infinite !important;
}
/* »ìÂ¦ ¹ÝÂ¦ÀÌ´Â ¾Ö´Ï¸ÞÀÌ¼Ç */
@keyframes newBadgePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}


.ai-tax-banner {
  padding: 22px 33px !important;
  border-radius: 6px !important;
  background-color: #e7eff9 !important;
  border: 1px solid #e2e8f0 !important;
  box-sizing: border-box !important;
  position: relative !important;
  width: 100% !important;
  top: 60px;
}

.ai-tax-banner-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: none !important;
}

/* ÁÂÃø ¿µ¿ª */
.ai-tax-banner-left {
  display: flex !important;
  align-items: center !important;
  gap: 28px !important;
  flex-shrink: 0 !important;
}

/* ¾ÆÀÌÄÜ */
.ai-tax-banner-icon-wrap {
  width: auto !important; /* °íÁ¤ Å©±â ÇØÁ¦ */
  height: auto !important; /* °íÁ¤ Å©±â ÇØÁ¦ */
  background-color: transparent !important; /* ¹è°æÀ» Åõ¸íÇÏ°Ô */
  border: none !important; /* Å×µÎ¸® Á¦°Å */
  border-radius: 0 !important; 
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
  margin: 0 !important; /* figure ÅÂ±×ÀÇ ±âº» ¿©¹é Á¦°Å */
}

.ai-tax-banner-icon {
  width: 75px !important; /*  ÀÌ ¼ýÀÚ¸¦ Á¶ÀýÇØ¼­ ¿øÇÏ´Â Å©±â·Î ¸ÂÃß¼¼¿ä (¿¹: 70px ~ 100px) */
  height: auto !important; /* ºñÀ²¿¡ ¸Â°Ô ÀÚµ¿ Á¶Àý */
  display: block !important;
}

/* ÅØ½ºÆ® */
.ai-tax-banner-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.ai-tax-banner-title {
  margin: 0 !important;
  font-size: 21px !important; 
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: #2d3748 !important;
  letter-spacing: -0.3px !important;
  display: flex !important;
  align-items: center !important;
}

.ai-tax-banner-desc {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14.5px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: #718096 !important;
}

/* ¿ìÃø ¹öÆ° */
.ai-tax-banner-right {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.ai-tax-banner-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 21px !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  color: #3b6fc1 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  border: 1px solid #cbd5e0 !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  letter-spacing: -0.2px !important;
  
  
    /* ... (±âÁ¸ ¼Ó¼ºµéÀº ±×´ë·Î µÎ¼¼¿ä) ... */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important; /* ±ÛÀÚ¿Í È­»ìÇ¥ »çÀÌÀÇ °£°Ý Ãß°¡ */
}


/* 2. »õ·Î Ãß°¡µÈ È­»ìÇ¥ ¾ÆÀÌÄÜ ½ºÅ¸ÀÏ & ¾Ö´Ï¸ÞÀÌ¼Ç */
.ai-btn-arrow {
  transition: transform 0.3s ease !important; /* ºÎµå·¯¿î È¸Àü/ÀÌµ¿ ¾Ö´Ï¸ÞÀÌ¼Ç */
}

.ai-tax-banner-btn:hover .ai-btn-arrow {
  transform: translateY(3px) !important; 
}

.ai-tax-banner-btn.active .ai-btn-arrow {
  transform: rotate(180deg) !important;
}

.ai-tax-banner-btn:hover,
.ai-tax-banner-btn:focus {
  background-color: #3b6fc1 !important;
  color: #ffffff !important;
  border-color: #3b6fc1 !important;
  text-decoration: none !important;
}

/* ¸ð¹ÙÀÏ ¹ÝÀÀÇü */
@media screen and (max-width: 768px) {
  .ai-tax-banner {
    padding: 16px 18px !important;
  }

  .ai-tax-banner-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }

  .ai-tax-banner-left {
    gap: 12px !important;
  }

  /* [¼öÁ¤µÈ ºÎºÐ] ¸ð¹ÙÀÏ¿¡¼­µµ ÇÏ¾á ¹Ú½º¸¦ ¾ø¾Ö°í ÀÌ¹ÌÁö¸¸ ¶ç¿ó´Ï´Ù */
  .ai-tax-banner-icon-wrap {
    width: auto !important;
    height: auto !important;
    background-color: transparent !important;
    border: none !important;
  }

  /* [¼öÁ¤µÈ ºÎºÐ] ¸ð¹ÙÀÏ È­¸é¿¡ ¸Â°Ô ÀÌ¹ÌÁö Å©±â¸¦ Á¶ÀýÇÕ´Ï´Ù (¿øÇÏ½Ã¸é ¼ýÀÚ º¯°æ °¡´É) */
  .ai-tax-banner-icon {
    width: 60px !important; 
    height: auto !important;
  }

  .ai-tax-banner-btn {
    width: 100% !important;
    padding: 10px 18px !important;
  }
}

/* IE/±¸¹öÀü ºê¶ó¿ìÀú Æú¹é (»èÁ¦ÇÏÁö ¸»°í ±×´ë·Î À¯Áö) */
@supports not (display: flex) {
  .ai-tax-banner-inner {
    zoom: 1;
  }
  .ai-tax-banner-inner:before,
  .ai-tax-banner-inner:after {
    content: "";
    display: table;
  }
  .ai-tax-banner-inner:after {
    clear: both;
  }
}


/* ================================
   ½ÉÇÃ Ã¤ÆÃ¹æ ½ºÅ¸ÀÏ
================================ */
.ai-chatroom {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  box-sizing: border-box !important;
  margin-top: 0; 
  transform: translateY(-10px);
  transition: max-height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
              opacity 0.3s ease,
              transform 0.4s ease,
              margin-top 0.4s ease;
  /* ¹è³Ê°¡ top: 60px ÀÌ¹Ç·Î Ã¤ÆÃ¹æµµ µ¿ÀÏÇÏ°Ô ÀÌµ¿½ÃÄÑ ·¹ÀÌ¾Æ¿ô ¾î¿ì·¯Áö°Ô Á¶Á¤ */
  position: relative;
  top: 60px;
  z-index: 4; 
  
  /* »óÀ§ ÅÂ±×ÀÇ padding ¿µÇâÀ» ¹ÞÁö ¾Êµµ·Ï ÃÊ±âÈ­ */
  padding-top: 0 !important; 
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden; /* ¿µ¿ª ¹ÛÀ¸·Î Æ¢¾î³ª°¡´Â °Í ¹æÁö */
    /* height: 700px; µî ±âÁ¸ °íÁ¤ ³ôÀÌ°¡ ÀÖ´Ù¸é ±×´ë·Î µÎ¼¼¿ä */
}


#chatBody {
    flex: 1 1 auto !important; 
    overflow-y: auto !important; 
    min-height: 0 !important;
}

#aiHistoryList {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

.ai-chatroom-input {
    flex: 0 0 auto !important; 
    box-sizing: border-box !important;
    margin-bottom: 10px !important; /* È­¸é ÇÏ´Ü(º¸´õ)°ú °ãÄ¡Áö ¾Ê°Ô ¿©¹é */
    position: relative !important;
}


/* »ç¿ëÀÚ(¿ìÃø) ¸»Ç³¼± Àü¿ë ½ºÅ¸ÀÏ */
.ai-user-bubble {
    background: #3b82f6 !important; /* ÆÄ¶õ»ö ¹è°æ */
    color: #ffffff !important;      /* ÇÏ¾á»ö ±ÛÀÚ */
    border-radius: 18px 4px 18px 18px !important; /* ²¿¸®°¡ ¿À¸¥ÂÊ À§¸¦ ÇâÇÏµµ·Ï */
    padding: 12px 18px !important;
    word-break: break-word; /* ±ÛÀÚ°¡ ±æ¾îÁö¸é ÁÙ¹Ù²Þ Ã³¸® */
    max-width: 80%;
}


.ai-chatroom.open {
    display: flex;             /* ¡ç ¿­¸± ¶§¸¸ flex */
    max-height: 600px;
    opacity: 1;
    margin-top: 12px;
    transform: translateY(0);
}

.ai-chatroom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  background-color: #f9fafb;
  border-radius: 12px 12px 0 0;
}

.ai-chatroom-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-chatroom-title::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* ´Ý±â ¹öÆ° ´«¿¡ ¶ç°Ô º¯°æ */
.ai-chatroom-close {
  width: 32px;
  height: 32px;
  border: none;
  background-color: #e5e7eb; 
  color: #4b5563; 
  font-size: 20px;
  line-height: 1;
  font-weight: bold;
  cursor: pointer;
  border-radius: 50%; 
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ai-chatroom-close:hover {
  background-color: #fee2e2; 
  color: #ef4444; 
  transform: scale(1.05); 
}

/* ================================
   Ã¤ÆÃ¹æ 2/3, 1/3 ºÐÇÒ ·¹ÀÌ¾Æ¿ô
================================ */
.ai-chatroom-layout {
    display: flex !important;
    flex: 1 1 auto !important; /* ¹è³Ê°¡ Â÷ÁöÇÏ°í ³²Àº ³ª¸ÓÁö °ø°£À» ¸ðµÎ Èí¼ö */
    min-height: 0 !important;  /* ¡ÚÇÙ½É: ³»ºÎ ÄÜÅÙÃ÷°¡ ºÎ¸ð ¿µ¿ªÀ» ¶Õ°í ³ª°¡Áö ¸øÇÏ°Ô Àá±Ý */
}

/* 3. ¿ÞÂÊ Ã¤ÆÃ ¿µ¿ª ºÎ¸ð : ³»ºÎ¸¦ ´Ù½Ã ¼¼·Î ¹è¿­·Î ÂÉ°· */
.ai-chatroom-layout > div:first-child { 
    /* ÁÂÃø ¿µ¿ª Å¬·¡½º¸íÀ» ¸ô¶ó first-child·Î °­Á¦ ÁöÁ¤Çß½À´Ï´Ù */
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

.ai-chatroom-layout > div:last-child {
    flex: 0 0 374px !important; /*  ÀÌ ¼ýÀÚ¸¦ ´Ã¸®¸é ÆÐ³ÎÀÌ Ä¿Áý´Ï´Ù! (¿¹: 450px, 500px) */
    width: 450px !important;    /*  À§¿Í ¶È°°Àº ¼ýÀÚ·Î ¸ÂÃçÁÖ¼¼¿ä */
    flex-shrink: 0 !important;  /* Ã¤ÆÃÃ¢¿¡ ¹Ð·Á Âî±×·¯ÁöÁö ¾Ê°Ô °íÁ¤ */
}

.ai-chatroom-left {
  flex: 2; /* 2/3 ¿µ¿ª Â÷Áö */
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e5e7eb;
}

.ai-chatroom-right {
  flex: 1; /* 1/3 ¿µ¿ª Â÷Áö */
  display: flex;
  flex-direction: column;
  padding: 20px;
  background-color: #fdfdfd;
  border-radius: 0 0 12px 0;
}

.ai-chatroom-right-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ================================
   ¿ìÃø ¸®½ºÆ® ¿µ¿ª ½ºÅ¸ÀÏ (1/3)
================================ */
.ai-history-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
  padding-top: 4px; 
  padding-bottom: 2px; /* ¾Æ·¡ÂÊ ±×¸²ÀÚ°¡ Àß¸°´Ù¸é °°ÀÌ Ãß°¡ */
}

.ai-history-list::-webkit-scrollbar { width: 6px; }
.ai-history-list::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
.ai-history-list::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
.ai-history-list::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

/* ÃÊ±â »óÅÂ ºó È­¸é ¾È³» */
.ai-history-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #9ca3af;
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

/* ÃßÃµ ¸®½ºÆ® ¾ÆÀÌÅÛ ½ºÅ¸ÀÏ */
.ai-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-history-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.ai-history-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-history-item-company {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
}

.ai-history-item-desc {
  font-size: 12px;
  color: #6b7280;
}

.ai-history-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #3b82f6;
}

/* ÇÏ´Ü ¾È³» ¹®±¸ */
.ai-history-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #e5e7eb;
  font-size: 12.5px;
  color: #6b7280;
  text-align: center;
  line-height: 1.5;
}

.ai-history-footer strong {
  color: #374151;
}

/* Ã¤ÆÃ¹æ ³»¿ë ¿µ¿ª Å©±â °íÁ¤ ¹× ½ºÅ©·Ñ Ãß°¡ (ÁÂÃø) */
.ai-chatroom-body {
  padding: 20px;
  height: 350px; 
  overflow-y: auto; 
}

/* ½ºÅ©·Ñ¹Ù µðÀÚÀÎ Ä¿½ºÅÒ (À¥Å¶ ºê¶ó¿ìÀú¿ë) */
.ai-chatroom-body::-webkit-scrollbar {
  width: 6px;
}
.ai-chatroom-body::-webkit-scrollbar-track {
  background: #f1f5f9; 
  border-radius: 10px;
}
.ai-chatroom-body::-webkit-scrollbar-thumb {
  background-color: #cbd5e1; 
  border-radius: 10px;
}
.ai-chatroom-body::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8; 
}

.ai-message {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  background-color: #3b82f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-message-avatar svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.ai-message-content {
  flex: 1;
}

.ai-message-bubble {
    background-color: #f9fafb;
    border-radius: 4px 12px 12px 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
    max-width: 100%;
    display: inline-block;
    width: fit-content;
    word-spacing: 3px;
}


/* =======================================================
   [¿©±â¿¡ Ãß°¡] µ¿Àû AI ¸»Ç³¼± Á¤·Ä ¹× ·Î°í ½ºÅ¸ÀÏ 
======================================================= */
/* AI ÀüÃ¼ ¸Þ½ÃÁö Çà (ÇÁ·ÎÇÊ + ¸»Ç³¼± À§ÂÊÀ¸·Î °¡Áö·±È÷ Á¤·Ä) */
.ai-message-row {
    display: flex;
    align-items: flex-start !important; /* À§ÂÊ(Top) ¼±»ó¿¡ ³ª¶õÈ÷ ¸ÂÃã */
    gap: 12px; 
    margin-bottom: 24px;
}

/* AI ÇÁ·ÎÇÊ ÀÌ¹ÌÁö Æ² (µ¿±×¶ó¹Ì À¯Áö, Âî±×·¯Áü ¹æÁö) */
.ai-profile-box {
    flex-shrink: 0 !important;
    width: 36px;             
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff; /* ÇÊ¿ä½Ã ¼¾µåºô ºí·ç #4A7AFA ·Î º¯°æ */
}

.ai-profile-box img,
.ai-profile-box svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* AI ¸»Ç³¼± (ÁÂÃø »ó´Ü¸¸ »ÏÁ·ÇÏ°Ô) */
.ai-bubble-box {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 12px 16px;
    border-radius: 0 16px 16px 16px; 
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    max-width: 80%;
    word-break: break-word;
}
/* ======================================================= */


.ai-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ai-quick-btn {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-quick-btn:hover {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.ai-chatroom-input {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #f3f4f6;
  background-color: #ffffff;
  border-radius: 0 0 0 12px;
}

.ai-chatroom-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
  background-color: #f9fafb;
}

.ai-chatroom-input input:focus {
  border-color: #3b82f6;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ai-chatroom-input input::placeholder {
  color: #9ca3af;
}

.ai-send-btn {
  width: 42px;
  height: 42px;
  border: none;
  background-color: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-send-btn:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.ai-send-btn svg {
  width: 18px;
  height: 18px;
  fill: white;
  margin-left: 2px;
}

/* ================================
   ¹ÝÀÀÇü ½ºÅ¸ÀÏ (¸ð¹ÙÀÏ¿¡¼­´Â »óÇÏ ¹èÄ¡)
================================ */
@media (max-width: 768px) {
  .ai-tax-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .ai-tax-banner-right {
    width: 100%;
  }

  .ai-tax-banner-btn {
    width: 100%;
    justify-content: center;
  }

  .ai-chatroom-header,
  .ai-chatroom-input {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ai-chatroom-body {
    padding: 16px;
    height: 300px; 
  }

  .ai-quick-actions {
    flex-direction: column;
  }

  .ai-quick-btn {
    width: 100%;
    text-align: center;
  }

  /* ºÐÇÒ ·¹ÀÌ¾Æ¿ô ¸ð¹ÙÀÏ ¼¼·Î ¹èÄ¡ */
  .ai-chatroom-layout {
    flex-direction: column;
  }
  .ai-chatroom-left {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
  .ai-chatroom-right {
    height: 350px;
    border-radius: 0 0 12px 12px;
  }
  .ai-chatroom-input {
    border-radius: 0;
  }
}


/* ================================
 AI ·Îµù ¾Ö´Ï¸ÞÀÌ¼Ç
================================ */
.ai-loading-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 20px;
}

.ai-loading-text {
     font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    /* Ãß°¡µÈ ºÎºÐ: Åõ¸íµµ°¡ º¯ÇÒ ¶§ 0.3ÃÊ µ¿¾È ºÎµå·´°Ô ÀüÈ¯µÇµµ·Ï ¼³Á¤ */
    transition: opacity 0.3s ease-in-out; 
    opacity: 1; 
}

.ai-typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    background-color: #9ca3af;
    border-radius: 50%;
    /* 1.4ÃÊ ÁÖ±â·Î ¹«ÇÑ ¹Ýº¹µÇ´Â ÅëÅë Æ¢´Â ¾Ö´Ï¸ÞÀÌ¼Ç */
    animation: typingBounce 1.4s infinite ease-in-out both;
}

/* °¢ Á¡¸¶´Ù µô·¹ÀÌ¸¦ ÁÖ¾î ¹°°áÃ³·³ º¸ÀÌ°Ô ¼³Á¤ */
.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { 
        transform: scale(0); 
        opacity: 0.4; 
    }
    40% { 
        transform: scale(1); 
        opacity: 1; 
    }
}



.panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-title svg {
    width: 18px; height: 18px; color: #3b82f6;
}

.panel-list-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.panel-list-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}
.panel-list-item-desc {
    font-size: 12px;
    color: #64748b;
}
.panel-list-item:hover {
    border-color: #3b82f6;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.1);
}

.panel-invoice {
    padding: 12px 16px;
}
.panel-invoice-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}
.panel-invoice-row span:first-child {
    color: #888;
}
.panel-invoice-actions {
    display: flex;
    gap: 8px;
    padding: 8px 16px 16px;
}
.panel-btn-confirm, .panel-btn-cancel {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.panel-btn-confirm {
    background: #4A7CFD;
    color: #fff;
}
.panel-btn-cancel {
    background: #f0f0f0;
    color: #333;
}


/* È÷½ºÅä¸® Ä«µå */
.ai-history-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.ai-history-card:hover {
    border-color: #3b82f6;
    background: #f0f5ff;
}
.ai-history-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}
.ai-history-card-sub {
    font-size: 12px;
    color: #9ca3af;
}
.ai-history-card-amount {
    font-size: 13px;
    font-weight: 700;
    color: #3b82f6;
    margin-top: 2px;
}

/* ÀÎº¸ÀÌ½º ¹Ì¸®º¸±â */
.ai-history-invoice {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
}
.ai-invoice-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.ai-invoice-row:last-of-type {
    border-bottom: none;
}
.ai-invoice-label {
    color: #6b7280;
    flex-shrink: 0;
    width: 50px;
}
.ai-invoice-value {
    color: #1f2937;
    font-weight: 500;
    text-align: right;
}
.ai-invoice-btn-area {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.ai-invoice-btn-confirm,
.ai-invoice-btn-cancel {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.ai-invoice-btn-confirm {
    background: #3b82f6;
    color: #fff;
}
.ai-invoice-btn-confirm:hover {
    background: #2563eb;
}
.ai-invoice-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}
.ai-invoice-btn-cancel:hover {
    background: #e5e7eb;
}

/* AI ÀÌ¿ëµ¿ÀÇ ¿À¹ö·¹ÀÌ ½ºÅ¸ÀÏ */
.ai-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex; 
    justify-content: center;
    align-items: center;
}


/* µ¿ÀÇ ¿Ï·á ÈÄ ¼û±è Ã³¸®¿ë Å¬·¡½º */
.ai-consent-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}
/* µ¿ÀÇ Ä«µå ½ºÅ¸ÀÏ */
.ai-consent-card {
    background: #ffffff;
    width: 500px; /* °¡·Î¸¦ »ìÂ¦ Å°¿ò */
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); /* °øÁß¿¡ ¶° ÀÖ´Â ´À³¦ °­È­ */
    /* border: 1px solid #e2e8f0; <- ÀÌ ÁÙÀº »èÁ¦ (±×¸²ÀÚ°¡ ÀÖÀ¸¹Ç·Î Å×µÎ¸® ºÒÇÊ¿ä) */
}

.ai-consent-card input[type="checkbox"] {
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 10px 0 0 !important;
    position: static !important;
    opacity: 1 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    cursor: pointer !important;
}

/* °ãÄ§ ¹æÁö¸¦ À§ÇÑ ·¹ÀÌ¾Æ¿ô ÃÊ±âÈ­ */
.ai-consent-card .checkbox-label {
    display: flex !important;
/*     align-items: center !important; */
    padding: 0 !important;
    height: auto !important;
    cursor: pointer;
    font-size: 15px;
    color: #334155;
}

.ai-consent-card .consent-items .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px !important; /* À§¾Æ·¡ °ãÄ§ ¹æÁö ¿©¹é */
    padding-top: 5px;
}

.ai-consent-header h2 {
    font-size: 22px;
    color: #1e293b;
    margin-bottom: 8px;
    font-weight: 700;
}

.ai-consent-header p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 30px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    color: #334155;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.consent-all {
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 15px;
}

.consent-items {
    padding-left: 10px;
}

.consent-items .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.consent-items .btn-detail {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
}

.consent-items .btn-detail:hover {
    text-decoration: underline;
    color: #3b82f6;
}

.mt-15 { margin-top: 15px; }

.consent-desc {
    font-size: 12px;
    color: #94a3b8;
    padding-left: 30px;
    margin-top: 5px;
    line-height: 1.4;
}

.ai-consent-footer {
    margin-top: 40px;
}

.btn-consent-submit {
    width: 100%;
    padding: 15px 0;
    background-color: #3b82f6;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-consent-submit:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
}

.btn-consent-submit:not(:disabled):hover {
    background-color: #2563eb;
}

/* ¾à°ü »ó¼¼ ÆË¾÷ Àü¿ë ½ºÅ¸ÀÏ */
.terms-scroll-area::-webkit-scrollbar {
    width: 6px;
}
.terms-scroll-area::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}
.terms-scroll-area table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 12px;
}
.terms-scroll-area th, .terms-scroll-area td {
    border: 1px solid #cbd5e1;
    padding: 10px;
    vertical-align: top;
}
.terms-scroll-area th {
    background-color: #f8fafc;
    font-weight: 600;
    text-align: left;
    width: 30%;
}
.terms-scroll-area h3 {
    font-size: 15px;
    color: #1e293b;
    margin: 20px 0 10px 0;
}


/* AI Àº±ÙÇÑ °æ°í ¹è³Ê ½ºÅ¸ÀÏ */
.ai-warning-banner {
    background-color: #fffbeb;
    border-bottom: 1px solid #fde68a;
    color: #b45309;
    padding: 10px 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease-out;
}

.ai-warning-banner svg {
    width: 16px; 
    height: 16px; 
    margin-right: 8px; 
    stroke: #d97706;
}

.ai-warning-banner span {
    flex: 1;
}

.ai-warning-banner a {
    color: #d97706;
    font-weight: 700;
    text-decoration: none;
    margin-left: 15px;
}

.ai-warning-banner a:hover {
    text-decoration: underline;
    color: #b45309;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 'ÇÊ¼ö Ç×¸ñ ¸ðµÎ µ¿ÀÇÇÒ°Ô¿ä' ¶óº§ ¿µ¿ª */
.ai-consent-body > label {
    display: flex !important;
    align-items: center !important;
    
    /* ÇÙ½É: ±ÛÀÚ¿Í È¸»ö ¼± »çÀÌÀÇ À§¾Æ·¡ °£°ÝÀ» ³Ð°Ô ¹ú·ÁÁÝ´Ï´Ù */
    padding-bottom: 16px !important; 
    margin-bottom: 16px !important;  
}

/* ¾Æ·¡ÂÊ °³º° Ç×¸ñµéÀÌ µé¾îÀÖ´Â ¹Ú½º (¼±ÅÃ »çÇ×: ¼± ¹Ù·Î ¾Æ·¡ °£°Ý) */
.ai-consent-body .consent-items {
    padding-top: 5px !important; 
}


/* SweetAlert2 ÆË¾÷ css start */
/* °¡Àå ±ò²ûÇÑ ¹«·á ÆùÆ®ÀÎ 'Pretendard' À¥ ÆùÆ® ºÒ·¯¿À±â */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* ÆË¾÷ ÀüÃ¼ ¸ð¼­¸® ¹× ¹è°æ ¼³Á¤ */
.modern-swal-popup {
    border-radius: 20px !important; /* µÕ±ÛµÕ±ÛÇÑ ÃÖ½Å ½ºÅ¸ÀÏ */
    padding: 40px 24px 24px !important; 
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
}

/* Á¦¸ñ ÆùÆ® ½ºÅ¸ÀÏ */
.modern-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #191f28 !important; /* ¿ÏÀü °ËÀº»öº¸´Ù ¼¼·ÃµÈ ÁøÇÑ ´ÙÅ©±×·¹ÀÌ */
    margin: 0 0 12px 0 !important;
    letter-spacing: -0.5px !important;
}

/* º»¹®(¼³¸í) ÆùÆ® ½ºÅ¸ÀÏ */
.modern-text {
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #8b95a1 !important; /* ºÎµå·¯¿î È¸»ö */
    margin: 0 0 32px 0 !important;
    letter-spacing: -0.3px !important;
    line-height: 1.5 !important;
}

/* ¹öÆ°µéÀ» °¨½Î´Â ¿µ¿ª (¹öÆ° 2°³¸¦ 5:5·Î ²Ë Â÷°Ô ¹èÄ¡) */
.modern-actions {
    display: flex !important;
    width: 100% !important;
    gap: 12px !important; /* ¹öÆ° »çÀÌ °£°Ý */
    margin: 0 !important;
}

/* °øÅë ¹öÆ° ½ºÅ¸ÀÏ */
.modern-btn {
    flex: 1 !important; /* ¹öÆ°ÀÌ ¹Ý¹Ý¾¿ °ø°£À» Â÷ÁöÇÏµµ·Ï ¼³Á¤ */
    padding: 16px 0 !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    border: none !important;
    margin: 0 !important;
}

/* 1. [ÀÌ¾î¼­ ÀÛ¼º] ¸ÞÀÎ °­Á¶ ¹öÆ° */
.btn-primary {
    background-color: #3182f6 !important; /* Æ®·»µðÇÑ ºí·ç */
    color: #ffffff !important;
}
.btn-primary:hover {
    background-color: #1b64da !important;
}

/* 2. [»õ·Î ½ÃÀÛ] ¼­ºê ¹öÆ° (Å×µÎ¸® ´ë½Å ºÎµå·¯¿î È¸»ö ¹è°æ) */
.btn-secondary {
    background-color: #f2f4f6 !important; 
    color: #4e5968 !important; 
}
.btn-secondary:hover {
    background-color: #e5e8eb !important;
}

/* ¿ìÃø »ó´Ü X ´Ý±â ¹öÆ° ¸ð´ø ½ºÅ¸ÀÏ¸µ */
.swal2-close {
    color: #8b95a1 !important; /* ºÎµå·¯¿î È¸»ö */
    font-size: 1.5rem !important;
    border-radius: 50% !important; /* µ¿±×¶õ È£¹ö È¿°ú¸¦ À§ÇØ */
    transition: all 0.2s ease !important;
    margin-top: 8px !important;
    margin-right: 8px !important;
}
.swal2-close:hover {
    color: #191f28 !important; /* ¸¶¿ì½º ¿Ã¸®¸é ÁøÇØÁü */
    background-color: #f2f4f6 !important; /* ¿¶Àº È¸»ö ¹è°æ »ý¼º */
}


/* ========================================
   AI ¿µ¼öÁõ & ¸®½ºÆ® ¹Ì´Ï¸Ö (Åä½º ½ºÅ¸ÀÏ) UI
======================================== */
.ai-receipt-card {
    background: #ffffff !important;
    border: 1px solid #e5e8eb !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
}

.ai-receipt-header {
    background: linear-gradient(135deg, #3b82f6 0%, #487ef3  100%) !important;
    padding: 14px 20px !important;
    color: #ffffff !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px !important;
}

.ai-receipt-body {
    padding: 16px 20px !important;
}

.ai-receipt-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f1f3f5 !important;
    line-height: 1.5 !important;
}

.ai-receipt-row:last-of-type {
    border-bottom: none !important;
}

.ai-receipt-label {
    color: #8b95a1 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    min-width: 70px !important;
    flex-shrink: 0 !important;
}

.ai-receipt-value {
    color: #333d4b !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: right !important;
    flex: 1 !important;
    word-break: keep-all !important; /* break-all -> keep-all */
    white-space: normal !important;
}

.ai-receipt-total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 14px !important;
    margin-top: 12px !important;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border-radius: 10px !important;
    border-bottom: none !important;
}

.ai-receipt-total .ai-receipt-label {
    color: #333d4b !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    min-width: auto !important;
    flex-shrink: 0 !important;
}

.ai-receipt-total .ai-receipt-value {
    color: #333d4b !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 3px !important;
    flex: 0 0 auto !important; /* flex-grow, flex-shrink ¸ðµÎ 0 */
    margin-left: auto !important;
    white-space: nowrap !important; /* ÁÙ¹Ù²Þ ¹æÁö */
}

.ai-receipt-unit {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #191f28 !important;
    margin-left: 0 !important;
}

.ai-receipt-actions {
    display: flex !important;
    gap: 10px !important;
    padding: 16px 20px !important;
    border-top: 1px solid #f8f9fa !important;
    background: #f8f9fa !important;
}

.ai-receipt-btn {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    border: none !important;
}

.ai-receipt-btn-cancel {
    flex: 1 !important;
    border: 1.5px solid #e5e8eb !important;
    background: #ffffff !important;
    color: #4e5968 !important;
}

.ai-receipt-btn-cancel:hover {
    background: #f2f4f6 !important;
}

.ai-receipt-btn-confirm {
    flex: 2 !important;
    background: linear-gradient(135deg, #3b82f6 0%, #5e8aeb  100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.ai-receipt-btn-confirm:hover {
    background: linear-gradient(135deg, #2563eb 0%, #5178e3  100%) !important;
}




/* ÅØ½ºÆ® ¹èÁö ½ºÅ¸ÀÏ (¿ø»ö Á¦°Å, ¸ð³ëÅæ) */
.ai-val-company { color: #191f28 !important; font-size: 15px !important; font-weight: 700 !important; }

.ai-badge-bizno {
    display: inline-block !important;
    margin-top: 4px !important;
    font-size: 12px !important;
    color: #8b95a1 !important;
    background: #f2f4f6 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
}
.ai-val-item {
    display: inline-block !important;
    background: #eff6ff !important; /* ¾ÆÁÖ ¿¬ÇÑ ÆÄ¶õ»ö ¹è°æ */
    color: #2563eb !important;      /* ¼±¸íÇÑ ÆÄ¶õ»ö ±Û¾¾ */
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border: 1px solid #bfdbfe !important;
}

/* AI Ã¤ÆÃ ¸Þ½ÃÁö ÆäÀÌµåÀÎ */
@keyframes aiFadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ai-message-animated {
    animation: aiFadeInUp 0.5s ease forwards;
}

/* ±âÁ¸ .ai-receipt-actions ¼öÁ¤ */
.ai-receipt-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-top: 1px solid #f1f5f9;
    gap: 8px;
}

/* ¹®¼­Å¸ÀÔ Åä±Û */
.ai-receipt-doc-toggle {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 3px;
}

.ai-receipt-doc-btn {
    padding: 5px 12px;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: -0.3px;
}

.ai-receipt-doc-btn.active {
    background: #ffffff;
    color: #3b82f6;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.ai-receipt-doc-btn:not(.active):hover {
    color: #475569;
}
