* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

.logo-svg {
  width: 70px;
  height: 70px;
}

.page {
  width: 100vw;
  height: 100vh;
  background-color: #1e90ff;
}

@media (max-width: 600px) {
  .page {
    background-color: #ffffff;
  }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 3px;
}

@media (hover: hover) {
  ::-webkit-scrollbar-thumb:hover {
    background: #888;
  }
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body::-webkit-scrollbar,
.history-items-container::-webkit-scrollbar,
.messages-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  padding-left: 10px;
}

body::-webkit-scrollbar-button,
.history-items-container::-webkit-scrollbar-button,
.messages-container::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body::-webkit-scrollbar-corner,
.history-items-container::-webkit-scrollbar-corner,
.messages-container::-webkit-scrollbar-corner {
  background-color: transparent;
}

* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

@media (hover: hover) {
  .history-items-container:hover,
  .messages-container:hover {
    scrollbar-color: #888 #f1f1f1;
  }

  .history-items-container:hover::-webkit-scrollbar-thumb,
  .messages-container:hover::-webkit-scrollbar-thumb {
    background-color: #888;
  }

  .history-items-container:hover::-webkit-scrollbar-track,
  .messages-container:hover::-webkit-scrollbar-track {
    background-color: #f1f1f1;
  }
}

.open-modal-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px;
  font-size: 16px;
  background-color: transparent;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  z-index: 999;
}

.logo-svg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-tooltip {
  position: absolute;
  right: 40px;
  bottom: 295px;
  background: rgba(0, 0, 0, 0.2);
  width: 300px;
  height: auto;
  min-height: 50px;
  max-height: 400px;
  border: 1px solid rgb(0, 0, 0);
  color: black;
  padding: 10px 10px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 16px;
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.typed-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: center;
  width: 100%;
  margin: auto 0;
}

.cursor {
  display: block;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@media (hover: hover) {
  .open-modal-btn:hover .logo-tooltip {
    opacity: 1;
    transform: translateX(0);
  }

  .open-modal-btn:hover .logo-svg {
    transform: scale(1.05);
  }
}

@media (max-width: 600px) {
  .logo-tooltip {
    position: absolute;
    right: 10px;
    bottom: 200px;
    background: rgba(0, 0, 0, 0.2);
    width: 150px;
    height: auto;
    min-height: 20px;
    max-height: 400px;
    border: 1px solid rgb(0, 0, 0);
    color: black;
    padding: 10px 10px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .typed-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: center;
    width: 100%;
    margin: auto 0;
  }

    .logo-svg {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.modal {
  width: 872px;
  height: 385px;
  background-color: white;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: height 0.3s ease;
  min-height: 420px;
  max-height: 680px;
}

.modal.expanded {
  height: 450px;
}

.close-modal-btn {
  position: absolute;
  width: 27px;
  height: 27px;
  top: 15px;
  right: 25px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.telegram {
  width: 20px;
  height: 20px;
}

.initial-view {
  padding: 30px 1px 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
}

.initial-view.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 25px;
}

.header-container .logo {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
}

.title {
  font-weight: 700;
  font-size: 32px;
  line-height: 100%;
  color: #000;
}

.greeting-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 0 25px;
}

.greeting-text {
  font-weight: 400;
  font-size: 18px;
  line-height: 100%;
  color: rgba(102, 102, 102, 1);
}

.details-btn {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background-color: transparent;
  border: 1px solid rgba(42, 69, 121, 1);
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  color: rgba(42, 69, 121, 1);
  cursor: pointer;
  transition: all 0.3s;
  width: 110px;
  height: 39px;
  margin-left: auto;
}

@media (hover: hover) {
  .details-btn:hover {
    background-color: #f0f0f0;
  }
}

.chat-container {
  position: relative;
  width: calc(100% - 50px);
  margin: 15px 25px 0;
  background: white;
  border-radius: 15px;
  border: 1px solid rgba(180, 180, 180, 1);
  min-height: 125px;
  overflow: hidden;
}

.chat-input {
  width: 100%;
  min-height: 60px;
  max-height: 180px;
  border-radius: 15px 15px 0 0;
  border: none;
  border-bottom: none;
  outline: none;
  padding: 20px;
  font-size: 16px;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
  background: transparent;
}

.chat-input::placeholder {
  color: #999;
}

.chat-button-row {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: white;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  gap: 15px;
}

.circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.internet-btn,
.paperclip-btn {
  background-color: white;
  border: 1px solid rgba(42, 69, 121, 1);
}

.send-btn {
  background-color: rgba(42, 69, 121, 1);
  border: none;
  margin-left: auto;
}

.circle-btn img {
  width: 16px;
  height: 16px;
}

.dialog-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px 25px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.1s ease;
  pointer-events: none;
}

.dialog-view.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.back-header {
  margin-bottom: 15px;
  padding: 0 0px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.back-btn span {
  font-weight: 400;
  font-size: 15px;
  line-height: 18px;
  color: #000;
}

.back-arrow {
  width: 16px;
  height: 16px;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 0px;
  margin-bottom: 15px;
}

.message {
  margin-bottom: 20px;
  animation: fadeIn 0.5s ease;
}

.user-message {
  font-weight: 500;
  font-size: 16px;
  line-height: 100%;
  color: #000;
  margin-left: 400px;
  margin-right: 10px;
  max-width: 80%;
  padding: 15px;
  border-radius: 8px;
  background-color: #e2f1fc;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.bot-response {
  font-weight: 400;
  font-size: 15px;
  line-height: 30px;
  color: #000;
  margin-right: 10px;
  margin-left: 0px;
  padding: 15px;
  border-radius: 8px;
  background-color: #f5f5f5;
  font-family: "Roboto", sans-serif;
  word-wrap: break-word;
  white-space: pre-wrap;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.feedback-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 20px;
  padding: 0 0px;
}

.feedback-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: none;
  border: none;
  border-radius: 20px;
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  color: black;
}

.feedback-btn img {
  width: 16px;
  height: 16px;
}

@media (hover: hover) {
  .feedback-btn:hover {
    background-color: #f0f0f0;
  }
}

.suggested-questions {
  margin-top: 15px;
  padding: 0 25px;
}

.question-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 5px;
}

.question-row:last-child {
  margin-bottom: 0;
}

.question-btn {
  height: 34px;
  background: white;
  border: 1px solid rgba(42, 69, 121, 1);
  border-radius: 17px;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  color: rgba(42, 69, 121, 1);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0 12px;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.question-btn img {
  max-width: 18px;
}

@media (hover: hover) {
  .question-btn:hover {
    background-color: #f0f0f0;
  }
}

.additional-input-container {
  position: relative;
  width: calc(100%);
  margin: 0 0px 0px 0;
  background: white;
  border-radius: 15px;
  border: 1px solid rgba(180, 180, 180, 1);
  min-height: 65px;
  overflow: hidden;
  padding-right: 0px;
}

.additional-chat-input {
  width: 100%;
  min-height: 45px;
  max-height: 135px;
  border: none;
  outline: none;
  padding: 15px 20px;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
  background: transparent;
  border-radius: 15px;
  padding-right: 60px;
}

.additional-chat-input::placeholder {
  color: #999;
}

.additional-send-btn {
  position: absolute;
  right: 15px;
  bottom: 30px;
  background-color: rgba(42, 69, 121, 1);
  border: none;
  width: 31px;
  height: 31px;
  z-index: 2;
}

.additional-send-btn img {
  width: 16px;
  height: 16px;
}

.history-container {
  margin-top: 20px;
  width: calc(100% - 5px);
  display: none;
  flex-direction: column;
  padding: 0 25px 20px;
}

.history-container.visible {
  display: flex;
}

.history-title {
  font-weight: 700;
  font-size: 19px;
  color: #000;
  margin-bottom: 10px;
  font-family: "Roboto", sans-serif;
}

.history-items-container {
  max-height: 150px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #ebebeb;
  cursor: pointer;
  min-height: 50px;
  margin-right: 5px;
}

@media (hover: hover) {
  .history-item:hover {
    background-color: rgba(218, 218, 218, 0.5);
    border-radius: 10px;
  }
}

.history-item-content {
  display: flex;
  align-items: center;
  flex-grow: 1;
  height: 100%;
}

.history-item-text {
  font-size: 15px;
  color: rgba(0, 0, 0, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  font-family: "Roboto", sans-serif;
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: 10px;
  font-weight: 400;
}

.history-item-delete {
  width: 13px;
  height: 13px;
  cursor: pointer;
  margin-right: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

@media (hover: hover) {
  .history-item:hover .history-item-delete {
    opacity: 1;
  }
}

.modal {
  transition: height 0.2s ease, transform 0.1s ease;
}

.initial-view {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dialog-view {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 600px) {
  .modal {
    width: 100% !important;
    min-height: 90vh !important;
    max-height: 90vh !important;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
  }

  .question-btn img {
    max-width: 20px;
  }

  .modal-overlay {
    padding: 0px;
    align-items: flex-end;
  }

  .header-container {
    padding: 0 10px;
    margin-top: 0px;
  }

  .logo {
    width: 23px;
    height: 23px;
  }

  .title {
    font-size: 20px;
    color: #393939;
  }

  .close-modal-btn {
    top: 10px;
    right: 10px;
  }

  .greeting-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    margin-top: 0px;
  }

  .greeting-text {
    font-size: 11px;
    color: #666;
    margin-bottom: 10px;
  }

  .details-btn {
    width: fit-content;
    height: 32px;
    font-size: 14px;
    color: #2a4579;
    font-weight: 700;
    margin-left: 0;
    line-height: normal;
  }

  .chat-container {
    width: calc(100% - 20px);
    margin: 10px 10px 0;
    min-height: 120px;
  }

  .chat-input {
    min-height: 120px;
    font-size: 14px;
    padding: 10px;
  }

  .chat-input::placeholder {
    font-size: 14px;
    color: #666;
  }

  .chat-button-row {
    height: 40px;
    padding: 0 10px;
    gap: 10px;
  }

  .circle-btn {
    width: 23px;
    height: 23px;
  }

  .circle-btn img {
    width: 12px;
    height: 12px;
  }

  .suggested-questions {
    display: flex;
    flex-direction: column;
    padding: 10px;
    margin-top: 10px;
  }

  .question-row {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
  }

  .question-btn {
    font-size: 8px;
    padding: 0 5px;
    height: 20px;
  }

  .history-container {
    padding: 0 10px 10px;
    margin-top: 10px;
    /* overflow-y: auto; */
  }

  .history-title {
    font-size: 16px;
    color: #393939;
    margin-bottom: 10px;
  }

  .history-item {
    min-height: 30px;
    padding: 5px 0;
  }

  .history-item-text {
    font-size: 9px;
  }

  .history-item-delete {
    width: 8px;
    height: 8px;
  }

  .back-btn {
    padding: 5px;
    gap: 6px;
    margin-top: 0px;
    margin-left: 0px;
  }

  .back-arrow {
    width: 12px;
    height: 12px;
  }

  .back-btn span {
    font-size: 10px;
    line-height: 18px;
  }

  .user-message {
    font-size: 11px;
    max-width: 100%;
    padding: 10px;
    margin-left: 110px;
    margin-right: 0px;
  }

  .bot-response {
    line-height: 16px;
    font-size: 11px;
    max-width: 100%;
    padding: 10px;
    margin-left: 0px;
    margin-right: 0px;
  }

  .feedback-buttons {
    gap: 5px;
    margin-top: 5px;
    margin-bottom: 10px;
  }

  .feedback-btn {
    width: 127px;
    height: 37px;
    font-size: 13px;
    gap: 5px;
    white-space: nowrap;
  }

  .feedback-btn img {
    width: 17px;
    height: 17px;
  }

  .additional-input-container {
    width: calc(100%px);
    margin: 20px 10px 0px;
    height: 38px;
    min-height: 38px;
    margin-left: 0px;
    border-radius: 20px;
    display: flex;
    align-items: center;
  }

  .additional-chat-input {
    height: 27px;
    min-height: 27px;
    font-size: 13px;
    border-radius: 50px;
    padding: 11px 15px;
    margin-bottom: 15px;
  }

  .additional-send-btn {
    width: 23px;
    height: 23px;
    right: 15px;
    bottom: 7px;
  }

  .additional-send-btn img {
    width: 15px;
    height: 15px;
  }

  .suggested-questions.desktop {
    display: none;
  }

  .suggested-questions.mobile {
    display: flex;
  }
}

.mobile-questions {
  display: none;
}

@media (max-width: 600px) {
  .mobile-questions {
    display: block;
    margin-top: 10px;
    padding: 0 10px;
  }

  .mobile-questions .question-btn {
    font-size: 14px;
    padding: 0 8px;
    height: 32px;
    width: auto;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-grow: 0;
    margin-right: 2px;
  }

  .mobile-questions .question-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
    justify-content: flex-start;
  }
}

.chat-input {
  transition: min-height 0.3s ease;
  font-family: "Roboto", sans-serif;
}

.modal {
  transition: height 0.3s ease;
}

@media (max-width: 600px) {
  .chat-container {
    min-height: 120px;
    transition: min-height 0.3s ease;
  }

  .chat-input {
    min-height: calc(75px - 20px);
    line-height: 1.3;
    font-size: 10px;
    padding: 10px;
    box-sizing: border-box;
    transition: min-height 0.3s ease;
  }
}

/* ═══════════════════════════════════════
   НОВЫЙ ВИДЖЕТ
═══════════════════════════════════════ */

.overlay {
  position: fixed; inset: 0;
  background: rgba(5,12,28,0.55);
  backdrop-filter: blur(3px);
  z-index: 9999; opacity: 0;
  pointer-events: none; transition: opacity 0.3s ease;
}
.overlay.open { opacity: 1; pointer-events: all; }

.widget {
  position: fixed; bottom: 20px; right: 20px;
  width: 420px; max-width: calc(100vw - 40px);
  height: calc(100vh - 40px); max-height: calc(100vh - 40px);
  background: #ffffff; border-radius: 24px;
  z-index: 10000; display: flex; flex-direction: column;
  overflow: hidden; transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 8px 60px rgba(5,12,28,0.25);
}
.widget.open { transform: translateY(0); }

.widget .header {
  padding: 20px 20px 0; display: flex;
  align-items: center; justify-content: space-between; flex-shrink: 0;
  background: none; border: none; margin: 0;
}
.widget .header-left { display: flex; align-items: center; gap: 12px; }
.widget.chat-mode .header-left { display: none; }

.widget .back-btn { display: none; }
.widget.chat-mode .back-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-family: 'Golos Text', sans-serif;
  font-size: 14px; font-weight: 600; color: #21467d; padding: 0;
}
.widget .back-btn svg { width: 20px; height: 20px; }

.widget .avatar {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #21467d, #3a7bd5);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; overflow: hidden; flex-shrink: 0;
}
.widget .avatar img { width: 100%; height: 100%; object-fit: cover; }
.widget .header-title {
  font-family: 'Unbounded', sans-serif; font-size: 13px;
  font-weight: 700; color: #0f1a2e;
}
.widget .header-sub {
  font-size: 12px; color: #7a8aa0; margin-top: 1px;
  display: flex; align-items: center; gap: 5px;
}
.online-dot {
  width: 7px; height: 7px; background: #48bb78;
  border-radius: 50%; display: inline-block;
}
.widget .header-actions { display: flex; gap: 6px; align-items: center; }
.widget .icon-btn {
  width: 36px; height: 36px; background: #f2f4f8;
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #4a5568; transition: background 0.15s;
}
.widget .icon-btn:hover { background: #e2e8f0; }
.widget .icon-btn svg { width: 18px; height: 18px; }

.hero {
  padding: 24px 20px 16px; text-align: center; flex-shrink: 0;
}
.hero-title {
  font-family: 'Unbounded', sans-serif; font-size: 16px;
  font-weight: 700; color: #0f1a2e; margin-bottom: 4px;
}
.hero-sub-text { font-size: 13.5px; color: #7a8aa0; }
.hero-more {
  display: inline-block; margin-top: 10px;
  font-size: 12px; font-weight: 600; color: #21467d;
  background: #e8eef8; border-radius: 20px;
  padding: 5px 14px; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.hero-more:hover { background: #21467d; color: white; }

.sections {
  flex: 1; overflow-y: auto; padding: 16px 20px 0;
  scrollbar-width: none; display: flex; flex-direction: column; gap: 16px;
}
.sections::-webkit-scrollbar { display: none; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.card {
  background: #f7f9fc; border: 1.5px solid #e8ecf4;
  border-radius: 14px; padding: 10px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  text-align: left; text-decoration: none;
}
.card:hover { border-color: #21467d; background: #eaf0f8; transform: translateY(-2px); }
.card-highlight {
  background: linear-gradient(135deg, #21467d, #3a7bd5) !important;
  border-color: transparent !important;
}
.card-highlight:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(33,70,125,0.4); }
.card-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #21467d, #3a7bd5);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.card-icon-solid { background: #21467d !important; }
.card-icon svg { width: 15px; height: 15px; fill: white; }
.card-icon-highlight { background: rgba(255,255,255,0.2) !important; }
.card-label { font-size: 11.5px; font-weight: 600; color: #0f1a2e; line-height: 1.3; }
.card-label-highlight { color: white !important; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #f2f4f8; border: none; border-radius: 20px;
  padding: 7px 14px; font-size: 13px; color: #2d3748;
  font-family: 'Golos Text', sans-serif; cursor: pointer;
  transition: background 0.15s, transform 0.1s; white-space: nowrap;
}
.chip:hover { background: #e2e8f0; transform: translateY(-1px); }

.widget .input-area { padding: 10px 16px 18px; flex-shrink: 0; }
.input-box {
  border: 1.5px solid #d6dff0; border-radius: 14px;
  overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; background: #fff;
}
.input-box:focus-within { border-color: #21467d; box-shadow: 0 0 0 3px rgba(33,70,125,0.1); }
.input-field {
  width: 100%; padding: 12px 16px 4px;
  border: none; outline: none; resize: none;
  font-family: 'Golos Text', sans-serif; font-size: 14px; color: #0f1a2e;
  background: transparent; min-height: 48px; max-height: 100px; line-height: 1.5;
}
.input-field::placeholder { color: #a0aec0; }
.input-footer {
  display: flex; align-items: center;
  justify-content: space-between; padding: 4px 10px 10px;
}
.input-icons { display: flex; gap: 4px; }
.ii {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid #d6dff0; background: transparent;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: #21467d;
  transition: background 0.15s; text-decoration: none;
}
.ii:hover { background: #e8eef8; }
.ii svg { width: 16px; height: 16px; }
.widget .send-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #21467d, #3a7bd5);
  border: none; cursor: pointer; margin-left: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(33,70,125,0.4);
  transition: transform 0.15s, box-shadow 0.15s; flex-shrink: 0;
}
.widget .send-btn:hover { transform: scale(1.06); box-shadow: 0 4px 16px rgba(33,70,125,0.55); }
.widget .send-btn svg { width: 17px; height: 17px; fill: white; margin-left: 2px; }

.home-view { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.widget.chat-mode .home-view { display: none; }

.chat-view { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.widget.chat-mode .chat-view { display: flex; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 14px; scrollbar-width: none;
}
.chat-messages::-webkit-scrollbar { display: none; }
.msg { display: flex; flex-direction: column; max-width: 85%; animation: msgIn 0.25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.bot { align-self: flex-start; align-items: flex-start; }
.bubble { padding: 11px 16px; border-radius: 18px; font-size: 14px; line-height: 1.5; }
.msg.user .bubble {
  background: linear-gradient(135deg, #21467d, #3a7bd5);
  color: white; border-radius: 18px 18px 4px 18px;
}
.msg.bot .bubble { background: #f2f4f8; color: #0f1a2e; border-radius: 18px 18px 18px 4px; }
.typing {
  display: flex; align-items: center; gap: 4px;
  padding: 14px 16px; background: #f2f4f8; border-radius: 18px 18px 18px 4px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #a0aec0; animation: bounce 1.2s infinite; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }
.notice { font-size: 11px; color: #a0aec0; text-align: center; padding: 8px 0 4px; flex-shrink: 0; }

.history-view {
  position: absolute; inset: 0; background: white;
  border-radius: 24px; z-index: 10;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; padding: 20px;
}
.history-view.open { transform: translateX(0); }
.history-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 24px;
}
.history-title-new {
  font-family: 'Unbounded', sans-serif; font-size: 16px;
  font-weight: 700; color: #0f1a2e;
}
.history-items { flex: 1; overflow-y: auto; scrollbar-width: none; }
.history-date {
  font-size: 11px; color: #a0aec0; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px;
}
.history-item-new {
  padding: 12px 0; border-bottom: 1px solid #f0f2f7;
  font-size: 14px; color: #0f1a2e; cursor: pointer; transition: color 0.15s;
}
.history-item-new:hover { color: #21467d; }

@media (max-width: 600px) {
  .widget {
    bottom: 70px;
    right: 0; left: 0; top: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    border-radius: 0;
    transform: scale(0.97);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
    box-shadow: none;
    pointer-events: none;
  }
  .widget.open {
    transform: scale(1) !important;
    opacity: 1 !important;
    pointer-events: all;
    visibility: visible !important;
  }
  .widget::before { display: none; }
  .widget .header { padding: 8px 16px 0; }
  .widget .avatar { width: 38px; height: 38px; }
  .widget .header-title { font-size: 12px; }
  .widget .icon-btn { width: 32px; height: 32px; }
  .hero { padding: 16px 16px 10px; }
  .hero-title { font-size: 15px; }
  .sections { padding: 10px 16px 0; gap: 12px; }
  .cards { gap: 6px; }
  .card { padding: 8px; border-radius: 12px; }
  .card-label { font-size: 10.5px; }
  .card-icon { width: 24px; height: 24px; border-radius: 6px; }
  .card-icon svg { width: 12px; height: 12px; }
  .chip { font-size: 12px; padding: 5px 10px; }
  .widget .input-area { padding: 8px 12px 16px; }
  .input-field { font-size: 16px; min-height: 44px; }
  .chat-messages { padding: 10px 16px; }
  .bubble { font-size: 13px; }
}

.widget.open {
  transform: translateY(0) !important;
  visibility: visible !important;
}

/* ── Mobile bottom nav ── */
.mobile-nav {
  display: none;
}

@media (max-width: 600px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 26px 26px 0 0;
    box-shadow:
      0 8px 32px rgba(15, 26, 46, 0.12),
      0 2px 8px rgba(15, 26, 46, 0.06),
      inset 0 1px 0 rgba(255,255,255,0.8);
    z-index: 10001;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    overflow: visible;
  }

  .mobile-nav::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
    border-radius: 50%;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    padding: 8px 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #8a9ab5;
    font-family: 'Golos Text', sans-serif;
    font-size: 10px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    border-radius: 16px;
    transition: color 0.2s, transform 0.15s;
  }

  .mobile-nav-item svg { width: 22px; height: 22px; }
  .mobile-nav-item.active { color: #21467d; }
  .mobile-nav-item:active { transform: scale(0.92); }

  .nav-liquid-pill {
    position: absolute;
    height: 54px;
    border-radius: 18px;
    background: rgba(33, 70, 125, 0.08);
    border: 1px solid rgba(33, 70, 125, 0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
    transition:
      left 0.45s cubic-bezier(0.34, 1.4, 0.64, 1),
      width 0.45s cubic-bezier(0.34, 1.4, 0.64, 1),
      opacity 0.25s ease;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  .nav-liquid-pill.visible { opacity: 1; }

  .mobile-nav-item.barsi-btn { position: relative; top: 0; }

  .nav-barsi-icon {
    width: 36px; height: 36px;
    border-radius: 12px;
    background: linear-gradient(145deg, #2a5299, #3a7bd5);
    display: flex; align-items: center; justify-content: center;
    box-shadow:
      0 2px 8px rgba(33,70,125,0.35),
      inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
    border: 1px solid rgba(255,255,255,0.4);
  }

  .mobile-nav-item.barsi-btn.active .nav-barsi-icon {
    background: linear-gradient(145deg, #1a3a7a, #2a5faa);
    box-shadow: 0 2px 12px rgba(33,70,125,0.5), inset 0 1px 0 rgba(255,255,255,0.25);
  }
  .mobile-nav-item.barsi-btn:active .nav-barsi-icon { transform: scale(0.88); }

  .mobile-nav-barsi-label { color: #8a9ab5; font-weight: 500; font-size: 10px; }
  .mobile-nav-item.barsi-btn.active .mobile-nav-barsi-label { color: #21467d; font-weight: 600; }

  /* Скрываем FAB кнопку на мобиле — её заменяет меню */
  .open-modal-btn { display: none; }
}
