/* ============================================================
   Khan SAT-1600 · ИИ-репетитор и уведомления
   Author: Xudoyorxon Bunyodov / Худоёрхон Бунёдов
   ============================================================ */
.tt-wrap { max-width: 800px; margin: 0 auto; }

.tt-quota { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7568;
  background: #F3F8F1; border: 1px solid #DFE8DC; border-radius: 10px; padding: 8px 13px; margin-bottom: 12px; }
.tt-quota b { color: #1B5E20; }
.tt-model { margin-left: auto; font-family: ui-monospace, monospace; font-size: 11.5px; color: #9aa; }

.tt-off { text-align: center; padding: 34px 20px; background: linear-gradient(165deg,#FFFDF4,#F8F4E4);
  border: 1px dashed #D9CFA4; border-radius: 16px; }
.tt-off .ic { font-size: 46px; }
.tt-off b { display: block; margin: 8px 0 5px; color: #8A6D14; font-size: 17px; }
.tt-off span { font-size: 14px; color: #7b7560; }

/* чат */
.tt-chat { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: #fff;
  border: 1px solid #E2E7DE; border-radius: 16px; min-height: 300px; max-height: 56vh; overflow-y: auto;
  scroll-behavior: smooth; }
.tt-msg { display: flex; gap: 10px; align-items: flex-start; animation: ttIn .3s cubic-bezier(.22,.7,.3,1); }
@keyframes ttIn { from { opacity: 0; transform: translateY(8px); } }
.tt-msg.me { flex-direction: row-reverse; }
.tt-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 17px; background: #F0F4EE; border: 1px solid #E0E6DD; }
.tt-msg.me .tt-av { background: #E8F2E6; }
.tt-bub { max-width: 82%; padding: 11px 15px; border-radius: 15px; font-size: 15px; line-height: 1.62;
  background: #F5F8F3; border: 1px solid #E4EAE1; }
.tt-msg.me .tt-bub { background: linear-gradient(160deg,#1B5E20,#175019); color: #F1F7EF; border-color: #14461a;
  border-bottom-right-radius: 4px; }
.tt-msg.ai .tt-bub { border-bottom-left-radius: 4px; }
.tt-msg.err .tt-bub { background: #FDF0F0; border-color: #F2D5D5; }
.tt-bub p { margin: 0 0 9px; } .tt-bub p:last-child { margin-bottom: 0; }
.tt-bub ul { margin: 6px 0; padding-left: 20px; }
.tt-bub li { margin: 3px 0; }
.tt-bub code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: 13.5px; }
.tt-msg.me .tt-bub code { background: rgba(255,255,255,.18); }
.tt-err { color: #C62828; }

.tt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tt-chip { background: #fff; border: 1px solid #DCE4D8; border-radius: 999px; padding: 7px 14px;
  font-size: 13px; cursor: pointer; color: #2c3a2e; transition: .18s cubic-bezier(.22,.7,.3,1); }
.tt-chip:hover { border-color: #C9A227; background: #FDF9EC; transform: translateY(-1px); }

/* индикатор набора */
.tt-dots { display: inline-flex; gap: 5px; align-items: center; }
.tt-dots i { width: 7px; height: 7px; border-radius: 50%; background: #9CB89A; display: block;
  animation: ttBounce 1.3s infinite ease-in-out; }
.tt-dots i:nth-child(2) { animation-delay: .16s; }
.tt-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes ttBounce { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-6px); opacity: 1; } }
.tt-loading { text-align: center; padding: 26px 10px; color: #7b8577; font-size: 14px; }

/* строка ввода */
.tt-bar { display: flex; gap: 9px; align-items: flex-end; margin-top: 12px; background: #fff;
  border: 1.5px solid #DDE4D9; border-radius: 15px; padding: 8px 8px 8px 15px;
  transition: border-color .2s, box-shadow .2s; }
.tt-bar:focus-within { border-color: #1B5E20; box-shadow: 0 0 0 3.5px rgba(27,94,32,.12); }
.tt-bar.dis { opacity: .5; }
.tt-bar textarea { flex: 1; border: none; outline: none; resize: none; font: inherit; font-size: 15px;
  line-height: 1.5; padding: 7px 0; background: transparent; max-height: 140px; }
.tt-send { flex: none; width: 42px; height: 42px; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(160deg,#2E7D32,#1B5E20); color: #F7DE8B; font-size: 17px;
  transition: transform .16s cubic-bezier(.22,.7,.3,1), box-shadow .2s; }
.tt-send:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); box-shadow: 0 6px 16px rgba(27,94,32,.3); }
.tt-send:active:not(:disabled) { transform: scale(.94); }
.tt-send:disabled { opacity: .4; cursor: default; }
.tt-hint { text-align: center; font-size: 11.5px; color: #9aa; margin-top: 7px; }

.tt-explain { font-size: 15px; line-height: 1.65; }
.tt-explain p { margin: 0 0 10px; }

/* ---------- уведомления ---------- */
.nt-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EFF2ED; }
.nt-row:last-child { border-bottom: none; }
.nt-ic { font-size: 24px; flex: none; }
.nt-t { flex: 1; }
.nt-t b { display: block; font-size: 14.5px; color: #123A16; margin-bottom: 3px; }
.nt-t input { width: 100%; }
.nt-ok { font-size: 12.5px; color: #2E7D32; font-weight: 700; }

.nt-steps { display: flex; flex-direction: column; gap: 13px; margin: 10px 0; }
.nt-step { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.55; }
.nt-step b { flex: none; width: 27px; height: 27px; border-radius: 50%; background: #1B5E20; color: #F7DE8B;
  display: grid; place-items: center; font-size: 13.5px; }
.nt-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 24px; font-weight: 800;
  letter-spacing: 3px; color: #1B5E20; background: #FBF4DC; border: 2px dashed #C9A227; border-radius: 11px;
  padding: 12px; text-align: center; margin-top: 8px; cursor: pointer; transition: .18s; }
.nt-code:hover { background: #F7EDCB; transform: scale(1.02); }

@media (max-width: 600px) {
  .tt-bub { max-width: 88%; font-size: 14.5px; }
  .tt-chat { max-height: 50vh; padding: 12px; }
}

/* аналоги */
.an-head { font-size: 12.5px; color: #7b8577; font-weight: 600; }
.an-in { display: flex; gap: 8px; margin-top: 10px; }
.an-done { text-align: center; padding: 24px 10px; }
.an-face { font-size: 52px; }
.an-done h3 { margin: 8px 0 4px; color: #1B5E20; }

/* паттерны */
.pt-stat { font-size: 13px; color: #6b7568; background: #F3F8F1; border: 1px solid #DFE8DC;
  border-radius: 9px; padding: 8px 12px; margin-bottom: 12px; }

/* Фейнман */
.fy-score { display: flex; align-items: center; gap: 16px; margin: 14px 0; }
.fy-ring { --p: 0; width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#C9A227 calc(var(--p)*1%), #E7E3D2 0); position: relative; }
.fy-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.fy-ring span { position: relative; z-index: 1; font-size: 20px; font-weight: 800; color: #1B5E20; }
.fy-lbl { font-size: 15px; font-weight: 600; color: #123A16; }
