/* Solid Rock Microfinance Bank — AI feature styles (chat assistant, loan assistant, scam checker) */
.eyebrow-icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tool-card { position: relative; padding: 32px 28px; border-radius: 18px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.tool-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: rgba(242,106,27,.08); }
.tool-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.tool-card h3 { margin: 14px 0 6px; }
.tool-card p { color: var(--muted); font-size: .95rem; margin-bottom: 20px; }
.tool-card .btn { margin-top: auto; position: relative; z-index: 1; }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr; } }

/* Tool pages */
.ai-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.ai-main { display: grid; gap: 24px; min-width: 0; }
.ai-aside { display: grid; gap: 18px; position: sticky; top: 110px; }
@media (max-width: 960px) { .ai-layout { grid-template-columns: 1fr; } .ai-aside { position: static; } }
.aside-card { background: var(--soft); border-radius: 16px; padding: 22px; }
.aside-card h3 { font-size: 1rem; display: flex; gap: 8px; align-items: center; }
.aside-card h3 svg { width: 18px; height: 18px; color: var(--navy); flex: none; }
.aside-card p { font-size: .93rem; margin: 0; }
.aside-card .checklist { margin: 10px 0 0; gap: 8px; font-size: .92rem; }
.aside-card--warn { background: #fff7f1; border: 1px solid #fbd9c3; }
.aside-card--warn h3 svg { color: var(--orange-600); }
.mini-steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: .93rem; }
.plain-list { list-style: none; display: grid; gap: 6px; margin: 8px 0 10px; font-weight: 600; }
.field input[type=file] { padding: 10px; font-size: .9rem; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 6px 0 18px; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--navy); }
.form-card .btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .65; cursor: wait; transform: none; }
.upload-preview { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.upload-preview img { max-height: 140px; width: auto; border-radius: 10px; border: 1px solid var(--line); }
[hidden] { display: none !important; }

.ai-result { display: grid; gap: 18px; scroll-margin-top: 110px; }
.ai-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.ai-card h3 { font-size: 1.08rem; }
.ai-card .checklist { margin: 8px 0 0; }
.ai-card--note { background: #f7f8fe; border-color: #c9cdf0; font-weight: 500; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .ai-grid { grid-template-columns: 1fr; } .ai-card { padding: 20px; } }
.recs { display: grid; gap: 12px; margin-top: 14px; }
.rec { border-radius: 12px; padding: 16px 18px; background: var(--soft); border-left: 4px solid var(--line); }
.rec--strong { border-left-color: var(--orange); background: #fff7f1; }
.rec__head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.rec h4 { margin: 0; font-family: var(--display); color: var(--ink); font-size: 1.05rem; }
.rec p { margin: 6px 0 0; font-size: .95rem; }
.pill { font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #eef0fb; color: var(--navy); white-space: nowrap; }
.rec--strong .pill { background: var(--orange); color: #fff; }
.qlist { padding-left: 20px; display: grid; gap: 8px; margin: 8px 0 0; }
.afford { margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: var(--soft); font-size: .95rem; }
.est { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
@media (max-width: 560px) { .est { grid-template-columns: 1fr; } }
.est-out { margin: 4px 0 0; font-size: 1.02rem; }
.disclaimer { font-size: .85rem; color: var(--muted); margin: 0; }
.ai-loading { display: flex; gap: 14px; align-items: center; padding: 26px; border-radius: 16px; background: var(--soft); }
.ai-loading p { margin: 0; font-weight: 600; color: var(--navy); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #d5d8f0; border-top-color: var(--navy); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-error { padding: 20px 22px; border-radius: 14px; background: #fdecec; border: 1px solid #f5c2c2; color: #8a1f1f; }
.ai-error p { margin: 4px 0 0; }
.ai-success h3 { color: #17663a; }

/* Scam verdict */
.verdict { border-radius: 18px; padding: 24px 26px; border: 2px solid; }
.verdict p { margin: 10px 0 0; font-size: 1.08rem; color: var(--ink); font-weight: 500; }
.verdict__label { font-family: var(--display); font-weight: 800; font-size: 1.5rem; margin-right: 12px; }
.verdict__conf { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.verdict--danger { background: #fdecec; border-color: #e0524f; color: #a61b1b; }
.verdict--warn { background: #fff5e6; border-color: #f0a33a; color: #9a5a00; }
.verdict--ok { background: #eaf7ef; border-color: #3aa76d; color: #17663a; }
.verdict--neutral { background: var(--soft); border-color: var(--line); color: var(--text); }
.flags { list-style: none; display: grid; gap: 12px; margin: 8px 0 0; }
.flags li { display: grid; gap: 2px; padding-left: 16px; border-left: 3px solid #e0524f; }
.flags li span { color: var(--muted); font-size: .94rem; }

/* Chat widget */
.to-top { bottom: 92px; }
.chat { position: fixed; right: 18px; bottom: 18px; z-index: 120; }
.chat-launcher { display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 999px; border: 0; background: var(--navy); color: #fff; font: 700 .95rem var(--font); box-shadow: 0 12px 30px rgba(18,24,69,.3); cursor: pointer; transition: transform .2s, background .2s; }
.chat-launcher:hover { background: var(--navy-700); transform: translateY(-2px); }
.chat-launcher svg { width: 22px; height: 22px; }
.chat.is-open .chat-launcher { display: none; }
.chat-panel { width: min(390px, calc(100vw - 24px)); height: min(620px, calc(100vh - 36px)); background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(18,24,69,.28); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 16px 16px 16px 18px; background: var(--navy); color: #d8dbf5; }
.chat-head h2 { color: #fff; font-size: 1.05rem; margin: 0; }
.chat-head p { margin: 0; font-size: .8rem; }
.chat-head div { flex: 1; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; flex: none; }
.chat-avatar svg { width: 20px; height: 20px; }
.chat-close { background: rgba(255,255,255,.1); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.chat-close svg { width: 18px; height: 18px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--soft); }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.55; overflow-wrap: anywhere; }
.msg p { margin: 0 0 .5em; }
.msg p:last-child { margin: 0; }
.msg ul, .msg ol { margin: .2em 0 .6em; padding-left: 18px; }
.msg li { margin-bottom: 3px; }
.msg--bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; color: var(--ink); }
.msg--user { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg--error { background: #fdecec; border-color: #f5c2c2; color: #8a1f1f; }
.msg a { text-decoration: underline; }
.typing { display: flex; gap: 4px; padding: 4px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; background: var(--soft); }
.chat-chip { border: 1px solid #c9cdf0; background: #fff; color: var(--navy); border-radius: 999px; padding: 7px 12px; font: 600 .82rem var(--font); cursor: pointer; }
.chat-chip:hover { background: var(--navy); color: #fff; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 13px; font: inherit; font-size: .93rem; max-height: 120px; }
.chat-form textarea:focus { outline: none; border-color: var(--navy); }
.chat-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.chat-send:disabled { opacity: .5; cursor: wait; }
.chat-send svg { width: 19px; height: 19px; }
.chat-foot { margin: 0; padding: 0 14px 12px; font-size: .75rem; color: var(--muted); text-align: center; }
@media (max-width: 560px) {
  .chat { right: 12px; bottom: 12px; }
  .chat-launcher span { display: none; }
  .chat-launcher { padding: 15px; }
  .chat.is-open { inset: 0; }
  .chat.is-open .chat-panel { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .to-top { bottom: 84px; right: 14px; }
}
@media print { .chat, .to-top { display: none; } }
