* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: #fff;
  color: #1E293B;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: 0;
}

/* NAV mockup */
.nav {
  display: none;
}
.nav .nl { font-size:11px; font-weight:800; color:#E65100; letter-spacing:1.5px; text-transform:uppercase; padding-right:14px; margin-right:6px; border-right:1px solid #FFE0B2; white-space:nowrap; line-height:40px; }
.nav button { background:none; border:none; color:#5D4037; font-family:'Be Vietnam Pro',sans-serif; font-size:12px; font-weight:700; padding:6px 12px; cursor:pointer; border-radius:6px; white-space:nowrap; }
.nav button:hover { color:#E65100; background:#FFE0B2; }
.nav button.on { color:#E65100; background:#fff; font-weight:800; }

/* WRAP = khung chứa, 80% center, padding tạo viền kem */
.wrap {
  width: 80%;
  max-width: 1200px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
@media (max-width: 1024px) { .wrap { width: 100%; } }

/* SCREEN - position absolute để chồng, không x2 */
.sc {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0,0,0,.04), 2px 0 12px rgba(0,0,0,.04);
  display: none;
  z-index: 1;
}
.sc.on {
  display: flex;
  z-index: 2;
}
/* Content area scroll */
.sc .ca { overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.3) transparent; }
.sc .ca::-webkit-scrollbar { width: 6px; }
.sc .ca::-webkit-scrollbar-track { background: transparent; }
.sc .ca::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.3); border-radius: 3px; }
.sc .ca::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.5); }

/* LOGIN */
.login-sc { align-items:center; justify-content:center; flex-direction:column; gap:24px; }
.lcard { width:360px; text-align:center; background:#fff; border-radius:16px; padding:32px 28px; box-shadow:0 2px 12px rgba(0,0,0,.04); }
.lcard .logo { font-size:22px; font-weight:900; color:#0284C7; letter-spacing:1.5px; margin-bottom:2px; }
.lcard .slo { font-size:10px; font-weight:700; color:#475569; letter-spacing:1px; margin-bottom:22px; }
.lbtns { display:flex; flex-direction:column; gap:10px; }
.lbtn { display:flex; align-items:center; justify-content:center; gap:10px; padding:11px 0; border:1.5px dashed #16A34A; border-radius:8px; background:#FFF3E0; font-family:'Be Vietnam Pro',sans-serif; font-size:13px; font-weight:500; color:#E65100; cursor:pointer; transition:background-color .18s ease, border-color .18s ease, color .18s ease; }
.lbtn:hover { background:#FFE0B0; border-color:#118235; color:#B84000; }
.lbtn .zi { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:5px; background:#0068FF; color:#fff; font-size:16px; font-weight:900; line-height:1; }
.login-info { width:360px; text-align:center; font-size:12px; font-weight:600; color:#475569; line-height:1.7; }
.login-info a { color:#0284C7; font-weight:700; text-decoration:none; }
.login-info a:hover { text-decoration:underline; }

/* APP layout */
.sc.on.app { display:flex; height:100%; overflow:hidden; }

/* SIDEBAR */
.side { width:240px; flex-shrink:0; padding:16px 0; background:linear-gradient(to bottom, #FFF8EE, #A8DCF8); display:flex; flex-direction:column; overflow:hidden; }
.side-brand { padding:0 18px 14px; margin-bottom:8px; flex-shrink:0; }
.side-brand .nm { font-size:20px; font-weight:900; color:#0284C7; letter-spacing:1px; }
.side-brand .sl { font-size:10px; font-weight:700; color:#475569; margin-top:1px; }
.side-menu { padding:0 6px; flex:1; overflow-y:auto; }
.side-menu::-webkit-scrollbar { width:6px; }
.side-menu::-webkit-scrollbar-track { background:transparent; }
.side-menu::-webkit-scrollbar-thumb { background:rgba(148,163,184,0.3); border-radius:3px; }
.side-menu::-webkit-scrollbar-thumb:hover { background:rgba(148,163,184,0.5); }
.side-menu { scrollbar-width:thin; scrollbar-color:rgba(148,163,184,0.3) transparent; }
.si { display:flex; align-items:center; gap:8px; padding:8px 8px; border-radius:8px; font-size:14px; font-weight:600; color:#1E293B; cursor:pointer; }
.si:hover { color:#0284C7; }
.si.on { color:#0284C7; font-weight:700; }
.si .ic { font-size:17px; width:20px; text-align:center; flex-shrink:0; }
.side-div { height:8px; margin:4px 18px; }
.ocr-si { font-size:14px; display:flex; align-items:center; }
.ocr-si .ic { font-size:20px; }
.tg { width:28px; height:16px; border-radius:8px; background:#E2E8F0; position:relative; cursor:pointer; flex-shrink:0; margin-left:auto; }
.tg.on { background:#0EA5E9; }
.tg::after { content:''; position:absolute; top:2px; left:2px; width:12px; height:12px; border-radius:50%; background:#fff; }
.tg.on::after { left:14px; }
.tdb { display:flex; align-items:center; gap:8px; padding:8px 12px; margin:6px 10px 0; font-size:13px; font-weight:700; color:#059669; }
.tdb .ti { font-size:16px; }
.side-bot { padding:8px 18px; margin-top:6px; font-size:11px; font-weight:600; color:#059669; display:flex; align-items:center; justify-content:space-between; }
.side-bot .lo { cursor:pointer; font-weight:700; }
.side-bot .lo:hover { color:#0284C7; }

/* MAIN */
.ma { flex:1; display:flex; flex-direction:column; overflow:hidden; min-height:0; }
.tb { height:48px; flex-shrink:0; display:flex; align-items:center; justify-content:space-between; padding:0 24px; background:#FFF8EE; }
.tb-t { font-size:10px; font-weight:500; color:#1E293B; display:flex; align-items:center; gap:4px; }
.tb-u { font-size:11px; font-weight:500; color:#475569; display:flex; align-items:center; gap:6px; }
.tb-u .dot { width:6px; height:6px; background:#059669; border-radius:50%; }
.ca { flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column; min-height:0; scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.3) transparent; }
.ca::-webkit-scrollbar { width: 6px; }
.ca::-webkit-scrollbar-track { background: transparent; }
.ca::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.3); border-radius: 3px; }
.ca::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.5); }
.ca > .mc, .ca > .guide-section, .ca > .sg { flex-shrink:0; }
.ca > .web-footer { margin-top:auto; }
.mc { padding:18px; }
.mc .sh { font-size:15px; font-weight:600; color:#1E293B; padding-bottom:10px; margin-bottom:14px; display:flex; align-items:center; gap:8px; }
.mc .sh .ic { font-size:16px; }
.sg { height:20px; }

/* DREAMS phase 1 placeholders */
.dreams-placeholder {
  min-height: calc(100vh - 128px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 36px;
  border: 1px solid #D6E6F5;
  border-radius: 12px;
  background: linear-gradient(135deg, #F8FBFF 0%, #FFFDF8 100%);
}
.dreams-placeholder-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid #D6E6F5;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.08);
  font-size: 34px;
  flex-shrink: 0;
}
.dreams-placeholder-body {
  max-width: 560px;
}
.dreams-placeholder-kicker {
  font-size: 12px;
  font-weight: 800;
  color: #0284C7;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.dreams-placeholder h1 {
  font-size: 28px;
  line-height: 1.25;
  color: #0F172A;
  margin-bottom: 8px;
}
.dreams-placeholder p {
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
}
.dreams-placeholder-beyeu .dreams-placeholder-kicker {
  color: #16A34A;
}
@media (max-width: 640px) {
  .dreams-placeholder {
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 22px;
  }
  .dreams-placeholder h1 {
    font-size: 23px;
  }
}

/* BTN */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; border:none; border-radius:8px; font-family:'Be Vietnam Pro',sans-serif; font-weight:600; cursor:pointer; }
.btn-s { background:#0EA5E9; color:#fff; padding:10px 18px; font-size:14px; }
.btn-s:hover { background:#0284C7; }
.btn-o { background:transparent; border:1.5px solid #E2E8F0; color:#1E293B; font-weight:500; padding:10px 18px; font-size:14px; }
.btn-o:hover { border-color:#0EA5E9; color:#0EA5E9; }

/* UPLOAD */
.up-row { display:flex; align-items:center; gap:14px; padding:18px; background:#FFF3E0; border:1.5px dashed #16A34A; border-radius:10px; cursor:pointer; transition:background-color .18s ease, border-color .18s ease, color .18s ease; }
.up-row:hover { background:#FFE0B0; border-color:#118235; }
.up-row .up-ic { font-size:24px; flex-shrink:0; }
.up-row .t1 { font-size:14px; font-weight:500; color:#E65100; }
.up-row .t2 { font-size:12px; color:#B84000; margin-top:2px; }
.up-row .up-btn { padding:9px 18px; background:#FFF3E0; color:#E65100; border:1.5px dashed #16A34A; border-radius:8px; font-family:'Be Vietnam Pro',sans-serif; font-size:13px; font-weight:500; cursor:pointer; flex-shrink:0; transition:background-color .18s ease, border-color .18s ease, color .18s ease; }
.up-row .up-btn:hover { background:#FFE0B0; border-color:#118235; color:#B84000; }
.fa { display:flex; align-items:center; gap:8px; padding:10px 14px; background:#F0F9FF; border:1px solid #A8DCF8; border-radius:8px; font-size:13px; font-weight:500; color:#0284C7; margin-top:10px; }
.fa .rm { margin-left:auto; cursor:pointer; color:#475569; font-size:16px; }
.upload-hints { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.upload-hint { padding:4px 10px; border:1px dashed #E2E8F0; border-radius:12px; font-size:11px; color:#475569; cursor:default; }

/* CONFIG */
.cl { font-size:14px; font-weight:500; color:#1E293B; margin-bottom:8px; }
.disclaimer-top { display:flex; align-items:flex-start; gap:8px; padding:8px 0; margin-bottom:10px; cursor:pointer; }
.disclaimer-top input[type="checkbox"] { margin-top:2px; accent-color:#0EA5E9; width:16px; height:16px; flex-shrink:0; }
.disclaimer-top span { font-size:13px; color:#0284C7; line-height:1.5; }
.cfg { display:flex; gap:0; border:1.5px solid #E2E8F0; border-radius:10px 10px 0 0; overflow:hidden; }
.cfg-c { padding:18px; }
.cfg-c:first-child { flex:40; }
.cfg-c:last-child { flex:60; }
.cfg-c+.cfg-c { border-left:1.5px solid #E2E8F0; }
.cfg-c .cl { font-size:14px; color:#E65100; font-weight:500; margin-bottom:8px; }
.pills { display:flex; gap:12px; flex-wrap:wrap; }
.chk-pill { display:flex; align-items:center; gap:6px; cursor:pointer; white-space:nowrap; margin-bottom:6px; }
.chk-pill input[type="checkbox"], .chk-pill input[type="radio"] { accent-color:#0284C7; width:17px; height:17px; }
.chk-pill span { font-size:14px; color:#1E293B; }
.chk-pill.on span { color:#0284C7; }
.p { text-align:center; padding:10px 18px; border-radius:8px; border:1.5px dashed #F57C00; background:#F0FDF4; font-family:'Be Vietnam Pro',sans-serif; font-size:14px; color:#16A34A; cursor:pointer; white-space:nowrap; transition:background-color .18s ease, border-color .18s ease, color .18s ease; }
.p:hover { background:#C0FAD0; border-color:#C46300; color:#118235; }
.p.on { background:#C0FAD0; border:1.5px dashed #C46300; color:#118235; }
.note-box { padding:18px; border:1.5px solid #E2E8F0; border-top:none; }
.note-label { font-size:14px; color:#E65100; font-weight:500; margin-bottom:8px; }
.note-input { width:100%; min-height:80px; max-height:220px; padding:12px 14px; border:1.5px solid #E2E8F0; border-radius:10px; font-family:'Be Vietnam Pro',sans-serif; font-size:14px; color:#1E293B; resize:vertical; box-sizing:border-box; line-height:1.7; scrollbar-width:thin; scrollbar-color:rgba(148,163,184,0.3) transparent; }
.note-input::-webkit-scrollbar { width:6px; }
.note-input::-webkit-scrollbar-track { background:transparent; }
.note-input::-webkit-scrollbar-thumb { background:rgba(148,163,184,0.3); border-radius:3px; }
.note-input::-webkit-scrollbar-thumb:hover { background:rgba(148,163,184,0.5); }
.note-input:focus { outline:none; border-color:#0EA5E9; box-shadow:0 0 0 3px rgba(14,165,233,0.1); }
.note-input::placeholder { color:#94A3B8; font-size:13px; line-height:1.5; }
.sp-input { width:100%; padding:10px 14px; border:1.5px solid #E2E8F0; border-radius:10px; font-family:'Be Vietnam Pro',sans-serif; font-size:14px; color:#1E293B; box-sizing:border-box; margin-top:4px; }
.sp-input:focus { outline:none; border-color:#0EA5E9; }
.sp-input::placeholder { color:#94A3B8; font-size:13px; }

/* v4.2.17: Compact input cho term glossary rows — tránh kế thừa .note-input 80px (textarea ghi chú) */
.dich-term-input { flex:1; height:38px; padding:8px 12px; border:1.5px solid #E2E8F0; border-radius:8px; font-family:'Be Vietnam Pro',sans-serif; font-size:13px; color:#1E293B; box-sizing:border-box; background:#fff; transition:border-color 0.15s; }
.dich-term-input:focus { outline:none; border-color:#0EA5E9; box-shadow:0 0 0 3px rgba(14,165,233,0.1); }
.dich-term-input::placeholder { color:#94A3B8; }


.note-counter { text-align:right; font-size:12px; color:#475569; margin-top:4px; }
.cost-row { display:flex; align-items:center; justify-content:space-between; padding:18px; background:linear-gradient(135deg,#FFFCF8,#FFF6ED); border:1.5px solid #E2E8F0; border-top:none; border-radius:0 0 10px 10px; }
.cost-row .c1 { font-size:14px; color:#475569; }
.cost-td { font-size:14px; }
.cost-row .btn-run { padding:10px 24px; background:#FFF3E0; color:#E65100; border:1.5px dashed #16A34A; border-radius:8px; font-family:'Be Vietnam Pro',sans-serif; font-size:15px; font-weight:500; cursor:pointer; transition:background-color .18s ease, border-color .18s ease, color .18s ease; letter-spacing:0.02em; }
.cost-row .btn-run:hover { background:#FFE0B0; border-color:#118235; color:#B84000; }
.cost-row .btn-run.btn-disabled { opacity:0.35; cursor:not-allowed; background:#CBD5E1; color:#fff; border:1.5px dashed #94A3B8; }
.cost-row .btn-run.btn-disabled:hover { background:#CBD5E1; border-color:#94A3B8; color:#fff; }

/* PIPELINE */
.psteps { max-width:500px; }
.ps { display:flex; align-items:flex-start; gap:12px; padding:12px 0; position:relative; }
.ps:not(:last-child)::after { content:''; position:absolute; left:15px; top:44px; bottom:0; width:2px; background:#F1F5F9; }
.ps.d:not(:last-child)::after { background:#059669; }
.ps.r:not(:last-child)::after { background:linear-gradient(to bottom,#0EA5E9,#F1F5F9); }
.pd { width:32px; height:32px; flex-shrink:0; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800; border:2px solid #E2E8F0; background:#fff; z-index:1; }
.ps.d .pd { background:#059669; border-color:#059669; color:#fff; }
.ps.r .pd { border-color:#0EA5E9; color:#0EA5E9; animation:pu 1.5s infinite; }
@keyframes pu { 0%,100%{box-shadow:0 0 0 0 rgba(14,165,233,.3)} 50%{box-shadow:0 0 0 6px rgba(14,165,233,0)} }
.pi { flex:1; padding-top:2px; }
.pi .pn { font-size:13px; font-weight:800; color:#1E293B; }
.pi .pd2 { font-size:11px; font-weight:600; color:#475569; margin-top:1px; }
.pi .pt { font-size:10px; font-weight:700; color:#475569; margin-top:1px; }
.ps.w .pi .pn { color:#475569; }
.pb-bg { height:5px; background:#F1F5F9; border-radius:3px; overflow:hidden; margin-top:16px; }
.pb-f { height:100%; background:#0EA5E9; border-radius:3px; }
.pb-l { display:flex; justify-content:space-between; margin-top:4px; font-size:10px; font-weight:700; color:#475569; }

/* PIPELINE ICONS — bên phải mỗi step */
.ps { display:flex; align-items:flex-start; gap:12px; padding:12px 0; position:relative; }
.ps-icon { font-size:20px; margin-left:auto; flex-shrink:0; }
.ps-icon.active { animation: iconBounce 1s ease-in-out infinite; }
.ps-icon.waiting { opacity:0.4; animation: steamFloat 2s ease-in-out infinite; }
.ps-icon.done { opacity:1; }

@keyframes iconBounce {
  0%,100% { transform:scale(1); }
  50% { transform:scale(1.3); }
}
@keyframes steamFloat {
  0%,100% { transform:translateY(0); opacity:0.3; }
  50% { transform:translateY(-3px); opacity:0.5; }
}

/* RESULT */
.rtabs { display:flex; gap:4px; margin-bottom:16px; }
.rt { padding:6px 14px; border-radius:16px; border:1.5px solid #E2E8F0; background:#fff; font-family:'Be Vietnam Pro',sans-serif; font-size:11px; font-weight:700; color:#1E293B; cursor:pointer; }
.rt.on { background:#0EA5E9; border-color:#0EA5E9; color:#fff; }
.rt:hover:not(.on) { border-color:#0EA5E9; color:#0EA5E9; }
.ri { padding:12px 14px; border-radius:8px; border-left:4px solid #0EA5E9; background:#F8FAFC; margin-bottom:8px; }
.ri.hi { border-left-color:#0369A1; }
.rh { display:flex; align-items:center; gap:6px; margin-bottom:4px; }
.rb { padding:2px 6px; border-radius:4px; font-size:9px; font-weight:800; text-transform:uppercase; }
.rb.hi { background:#A8DCF8; color:#0369A1; }
.rb.me { background:#F0F9FF; color:#0284C7; }
.rb.lo { background:#A8DCF8; color:#059669; }
.rc { font-size:10px; font-weight:700; color:#475569; margin-left:auto; }
.rtt { font-size:12px; font-weight:800; color:#1E293B; margin-bottom:3px; }
.rd { font-size:11px; font-weight:600; color:#475569; line-height:1.5; }
.rci { font-size:10px; font-weight:700; color:#0284C7; margin-top:4px; }
.fi { padding:12px 14px; border-radius:8px; border:1.5px dashed #F57C00; background:#F0FDF4; margin-bottom:8px; }
.ft { font-size:12px; font-weight:800; color:#0284C7; margin-bottom:4px; }
.fvs { display:flex; gap:10px; margin-top:6px; }
.fv { flex:1; padding:8px 10px; background:#fff; border-radius:6px; border:1px solid #E2E8F0; }
.fv .fl { font-size:9px; font-weight:800; color:#475569; text-transform:uppercase; margin-bottom:3px; }
.fv .fx { font-size:11px; font-weight:600; color:#475569; line-height:1.4; }
.sr { display:flex; gap:10px; flex-wrap:wrap; }
.sm { flex:1; min-width:70px; text-align:center; padding:12px 8px; background:#F8FAFC; border-radius:8px; border:1px solid #F1F5F9; }
.sm .sv { font-size:18px; font-weight:900; color:#0284C7; }
.sm .sl { font-size:9px; font-weight:700; color:#475569; text-transform:uppercase; margin-top:2px; }

/* DISCLAIMER */
.chat-disclaimer { font-size:12px; color:#475569; padding:10px 0; text-align:center; line-height:1.5; margin-top:16px; }
.chat-disclaimer a { color:#16A34A; text-decoration:none; border-bottom:1px dashed #F57C00; }
.chat-disclaimer a:hover { color:#118235; border-color:#C46300; }



/* SIDEBAR CONTACT */
.side-contact { padding:4px 8px; margin-top:4px; font-size:11px; font-weight:600; color:#1E293B; line-height:1.7; }
.side-contact a { color:#0284C7; font-weight:700; text-decoration:none; }
.side-contact a:hover { text-decoration:underline; }
/* SIDEBAR LOGIN */
.side-login { padding:8px 10px; margin-top:8px; display:flex; flex-direction:column; gap:6px; }
.side-login-row { display:flex; gap:8px; }
.lbtn-s { flex:1; display:flex; align-items:center; justify-content:center; gap:6px; padding:8px 0; border:1.5px dashed #16A34A; border-radius:8px; background:#FFF3E0; font-family:'Be Vietnam Pro',sans-serif; font-size:12px; font-weight:500; color:#E65100; cursor:pointer; text-decoration:none; transition:background-color .18s ease, border-color .18s ease, color .18s ease; }
.zi-s { display:inline-flex; align-items:center; justify-content:center; width:14px; height:14px; border-radius:3px; background:#0068FF; color:#fff; font-size:10px; font-weight:900; line-height:1; }
.lbtn-s:hover { background:#FFE0B0; border-color:#118235; color:#B84000; }

/* WEB FOOTER */
.web-footer { display:flex; gap:16px; justify-content:center; padding:10px 24px; border-top:1px solid #A8DCF8; background:#F0F7FF; flex-shrink:0; }
.web-footer a { font-size:12px; font-weight:500; color:#1E293B; text-decoration:none; }
.web-footer a:hover { color:#0284C7; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .side { width:200px; }
  .web-footer { gap:8px; padding:8px 12px; flex-wrap:wrap; }
  .web-footer a { font-size:11px; }
  .tb { padding:0 12px; }
  .tb-t { font-size:10px; }
  .tb-u { font-size:10px; }
  .ca { padding:12px; }
  .mc { padding:18px; }
}
@media (max-width: 480px) {
  .side { width:180px; }
  .si { font-size:13px; padding:6px 10px; }
  .side-brand .nm { font-size:16px; }
  .ep-card { width:290px; padding:18px; }
}

/* GUIDE */
.guide-section { margin-top:6px; }
.guide-title { font-size:16px; font-weight:600; color:#1E293B; margin-bottom:4px; display:flex; align-items:center; gap:6px; }
.guide-item { font-size:14px; font-weight:500; color:#1E293B; line-height:1.6; }
.guide-item a { color:#0284C7; font-weight:600; font-size:14px; text-decoration:none; }
.guide-item a:hover { text-decoration:underline; }

/* AVATAR BUTTON */
.av-btn { font-size:18px; cursor:pointer; padding:2px 4px; border-radius:6px; }
.av-btn:hover { background:#F0F9FF; }
.td-click { cursor:pointer; font-weight:700; color:#E65100; }
.td-click:hover { text-decoration:underline; }

/* TD ERROR — thiếu trà đá */
.td-error { font-size:15px; font-weight:700; color:#0284C7; }
.td-error-link { cursor:pointer; font-weight:800; color:#E65100; text-decoration:underline; }
.td-error-link:hover { color:#BF360C; }
/* EDIT PROFILE POPUP */
.ep-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.3); z-index:9999; display:flex; align-items:center; justify-content:center; }
.ep-card { background:#fff; border-radius:14px; padding:24px; width:340px; box-shadow:0 8px 30px rgba(0,0,0,.12); position:relative; }
.ep-close { position:absolute; top:12px; right:14px; font-size:16px; font-weight:800; color:#475569; cursor:pointer; }
.ep-close:hover { color:#0284C7; }
.ep-title { font-size:15px; font-weight:800; color:#1E293B; margin-bottom:16px; }
.ep-section { margin-bottom:14px; }
.ep-label { font-size:11px; font-weight:800; color:#0284C7; margin-bottom:6px; }
.ep-count { font-weight:600; color:#475569; }
.ep-avatars { display:flex; flex-wrap:wrap; gap:6px; }
.ep-av { font-size:22px; width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:8px; border:2px solid #E2E8F0; cursor:pointer; }
.ep-av:hover { border-color:#0EA5E9; }
.ep-av.on { border-color:#0EA5E9; background:#F0F9FF; }
.ep-input { width:100%; padding:8px 12px; border:1.5px solid #E2E8F0; border-radius:8px; font-family:'Be Vietnam Pro',sans-serif; font-size:13px; font-weight:600; color:#1E293B; outline:none; }
.ep-input:focus { border-color:#0EA5E9; }
.ep-actions { display:flex; gap:8px; }
.ep-msg { margin-top:8px; font-size:11px; font-weight:700; min-height:16px; }

/* GỌI TRÀ ĐÁ — nút sidebar giống OAuth */
.side-td { padding:6px 10px; }
.td-btn { width:100%; padding:9px 0; border:1.5px dashed #16A34A; border-radius:6px; background:#FFF3E0; font-family:'Be Vietnam Pro',sans-serif; font-size:12px; font-weight:500; color:#E65100; cursor:pointer; transition:background-color .18s ease, border-color .18s ease, color .18s ease; }
.td-btn:hover { background:#FFE0B0; border-color:#118235; color:#B84000; }

/* GỌI TRÀ ĐÁ — popup */
.td-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.35); z-index:9999; display:flex; align-items:center; justify-content:center; }
.td-card { background:#fff; border-radius:16px; padding:32px; width:440px; max-width:90vw; box-shadow:0 8px 30px rgba(0,0,0,.15); position:relative; }
.td-close { position:absolute; top:12px; right:14px; font-size:16px; font-weight:800; color:#475569; cursor:pointer; }
.td-close:hover { color:#0284C7; }
.td-title { font-size:18px; font-weight:800; color:#1E293B; margin-bottom:14px; }
.td-body { font-size:14px; font-weight:500; color:#1E293B; line-height:1.7; }
.td-bank { margin-top:16px; display:flex; gap:16px; padding:18px; background:#F0F9FF; border-radius:12px; border:1.5px solid #A8DCF8; }
.td-qr { flex-shrink:0; }
.td-qr img { width:140px; height:140px; border-radius:10px; border:2px solid #E2E8F0; object-fit:contain; background:#fff; }
.td-info { flex:1; display:flex; flex-direction:column; justify-content:center; gap:6px; }
.td-row { display:flex; justify-content:space-between; align-items:center; }
.td-label { font-size:13px; font-weight:700; color:#475569; }
.td-val { font-size:14px; font-weight:700; color:#1E293B; }

/* LANGUAGE FLAG */
.flag-btn { cursor:pointer; opacity:0.4; padding:2px; display:inline-block; border-radius:2px; }
.flag-btn.on { opacity:1; }
.flag-btn:hover { opacity:0.8; }

/* SIDEBAR DATE */
.side-date { padding:6px 12px; font-size:11px; font-weight:600; color:#475569; text-align:center; }

/* GUIDE LINK — topbar */
.guide-link { font-size:12px; font-weight:800; color:#E65100; text-decoration:none; display:inline-flex; align-items:center; gap:3px; transition:color .2s; background:#FFF3E0; padding:3px 10px; border-radius:12px; border:1.5px solid #FFB74D; }
.guide-link:hover { color:#BF360C; background:#FFE0B2; border-color:#FF9800; }
.guide-icon { font-size:16px; display:inline-block; line-height:1; vertical-align:middle; }
.guide-new { font-size:9px; font-weight:800; color:#fff; background:#E65100; padding:1px 5px; border-radius:6px; margin-left:2px; animation:guidePulse 2s ease-in-out infinite; }
@keyframes guidePulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.7;transform:scale(1.1)} }

/* RESULT VIEW */
.rv-head { display:flex; align-items:center; gap:14px; margin-bottom:20px; padding:18px 22px; border-radius:14px; }
.rv-head.pass { background:linear-gradient(135deg,#A8DCF8,#D1FAE5); border-left:5px solid #059669; box-shadow:0 2px 12px rgba(5,150,105,0.08); }
.rv-head.flag { background:linear-gradient(135deg,#FFFBEB,#FEF3C7); border-left:5px solid #D97706; box-shadow:0 2px 12px rgba(217,119,6,0.08); }
.rv-head.block { background:linear-gradient(135deg,#FEF2F2,#FEE2E2); border-left:5px solid #DC2626; box-shadow:0 2px 12px rgba(220,38,38,0.08); }
/* v4.2 (18/04/2026): Banner riêng cho mode Biên dịch — bám design tokens hiện có */
/* dich-ok: nền Sky Light (đã dùng ở .fa, .rv-body h1 gradient) + border Sky (đã dùng ở .rv-body h1, .ep-av.on) */
.rv-head.dich-ok { background:#F0F9FF; border-left:5px solid #0EA5E9; box-shadow:0 2px 12px rgba(14,165,233,0.08); }
/* dich-tired: nền Orange bg (đã dùng ở .lbtn, .up-row, .cost-row .btn-run, .rv-td) + border cam nhạt (đã dùng ở .guide-link) — không đỏ/hồng */
.rv-head.dich-tired { background:#FFF3E0; border-left:5px solid #FFB74D; box-shadow:0 2px 12px rgba(255,183,77,0.08); }
.rv-icon { font-size:28px; }
.rv-verdict { font-size:18px; font-weight:800; }
.rv-td { margin-left:auto; font-size:14px; font-weight:700; color:#E65100; background:#FFF3E0; padding:6px 14px; border-radius:20px; }
.rv-actions { display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.rv-btn { padding:8px 16px; border:1.5px solid #E2E8F0; border-radius:10px; background:#fff; font-family:'Be Vietnam Pro',sans-serif; font-size:13px; font-weight:600; color:#475569; cursor:pointer; transition:all .2s; }
.rv-btn:hover { border-color:#0EA5E9; color:#0284C7; background:#F0F9FF; transform:translateY(-1px); box-shadow:0 2px 8px rgba(14,165,233,0.1); }
.rv-like { font-size:15px; padding:8px 12px; }
.rv-btn[data-action="tts-result"]:hover { background:#F0F9FF; border-color:#0EA5E9; color:#0284C7; }

/* RESULT BODY — typography chuyên nghiệp, tương đương Times New Roman 13-14 */
.rv-body { font-size:16.5px; font-weight:400; color:#1E293B; line-height:2; letter-spacing:0.01em; }
.rv-body h1 { font-size:22px; font-weight:900; color:#0284C7; margin:32px 0 14px; padding:12px 18px; border-left:4px solid #0EA5E9; background:linear-gradient(90deg,#F0F9FF,transparent); border-radius:0 10px 10px 0; letter-spacing:-0.01em; }
.rv-body h1:first-child { margin-top:0; }
.rv-body h2 { font-size:19px; font-weight:800; color:#1E293B; margin:26px 0 10px; padding:8px 14px; background:#F8FAFC; border-radius:8px; border-left:3px solid #0EA5E9; }
.rv-body h3 { font-size:17px; font-weight:700; color:#334155; margin:20px 0 8px; padding-left:12px; border-left:2px solid #CBD5E1; }
.rv-body h4 { font-size:16px; font-weight:700; color:#475569; margin:16px 0 6px; }
.rv-body p { margin:8px 0 12px; }
.rv-body strong { font-weight:700; color:#0F172A; }
.rv-body em { font-style:italic; color:#475569; }
.rv-body ul, .rv-body ol { margin:10px 0 14px 8px; padding-left:18px; }
.rv-body li { margin-bottom:8px; font-size:16px; line-height:1.9; }
.rv-body li::marker { color:#0EA5E9; font-weight:700; }
.rv-body blockquote { margin:12px 0; padding:14px 18px; border-left:4px solid; border-image:linear-gradient(to bottom,#0EA5E9,#7C3AED) 1; background:#FAFBFF; border-radius:0 10px 10px 0; font-size:15px; color:#334155; font-style:italic; line-height:1.8; }
.rv-body hr { border:none; height:1px; background:linear-gradient(90deg,transparent,#E2E8F0,transparent); margin:22px 0; }
.rv-body table { width:100%; border-collapse:separate; border-spacing:0; margin:14px 0; border-radius:10px; overflow:hidden; border:1px solid #E2E8F0; }
.rv-body table th { background:linear-gradient(135deg,#F0F9FF,#A8DCF8); color:#0284C7; font-weight:700; font-size:14.5px; padding:12px 14px; text-align:left; border-bottom:2px solid #0EA5E9; }
.rv-body table td { padding:10px 14px; font-size:14.5px; border-bottom:1px solid #F1F5F9; line-height:1.7; }
.rv-body table tr:nth-child(even) td { background:#FAFBFC; }
.rv-body table tr:hover td { background:#F0F9FF; transition:background .15s; }
.rv-body pre { background:#1E293B; color:#E2E8F0; padding:16px 18px; border-radius:10px; overflow-x:auto; font-size:14px; line-height:1.7; }
.rv-body code { background:#F1F5F9; padding:2px 7px; border-radius:5px; font-size:14px; color:#0284C7; font-weight:500; }
.rv-body pre code { background:none; color:inherit; padding:0; }

/* EXPORT */
.rv-export { display:flex; gap:10px; margin-top:24px; flex-wrap:wrap; }
.rv-export .btn { padding:10px 20px; border:1.5px solid #E2E8F0; border-radius:10px; background:#fff; font-family:'Be Vietnam Pro',sans-serif; font-size:13px; font-weight:700; color:#475569; cursor:pointer; transition:all .2s; }
.rv-export .btn:hover { border-color:#0EA5E9; color:#0284C7; background:#F0F9FF; transform:translateY(-1px); box-shadow:0 2px 8px rgba(14,165,233,0.12); }

/* DISCLAIMER — luôn hiện */
.rv-disclaimer { margin-top:20px; font-size:13px; font-weight:500; color:#64748B; padding:12px 16px; background:linear-gradient(90deg,#F8FAFC,#F0F9FF); border-radius:10px; border-left:3px solid #CBD5E1; line-height:1.7; }
.rv-disclaimer a { color:#0284C7; font-weight:600; text-decoration:none; }
.rv-disclaimer a:hover { text-decoration:underline; }

/* VSO-BF */
.vsobf-intro { font-size:13px; font-weight:500; color:#475569; line-height:1.7; padding:4px 0; }
.nc-desc-wrap { padding:18px; border:1.5px solid #E2E8F0; border-top:none; }
.nc-desc-label { font-size:14px; color:#E65100; margin-bottom:6px; }
.nc-desc-input { width:100%; min-height:70px; max-height:140px; padding:8px 10px; border:1.5px solid #E2E8F0; border-radius:8px; font-family:'Be Vietnam Pro',sans-serif; font-size:14px; color:#1E293B; resize:vertical; box-sizing:border-box; scrollbar-width:thin; scrollbar-color:rgba(148,163,184,0.3) transparent; }
.nc-desc-input::-webkit-scrollbar { width:6px; }
.nc-desc-input::-webkit-scrollbar-track { background:transparent; }
.nc-desc-input::-webkit-scrollbar-thumb { background:rgba(148,163,184,0.3); border-radius:3px; }
.nc-desc-input::-webkit-scrollbar-thumb:hover { background:rgba(148,163,184,0.5); }
.nc-desc-input:focus { outline:none; border-color:#0EA5E9; }
.nc-desc-input::placeholder { color:#94A3B8; font-size:13px; }
.nc-desc-count { text-align:right; font-size:11px; color:#64748B; margin-top:3px; }
.chat-divider { padding:8px 16px; font-size:13px; color:#475569; border-top:1px solid #E2E8F0; background:#FEFCFA; }
/* HISTORY PANEL */
/* hist-overlay + hist-panel popup đã bỏ — dùng screen lichsu */
.hist-hd { padding:14px 18px 10px; border-bottom:1px solid #F0E8DC; display:flex; align-items:center; justify-content:space-between; }
.hist-clear { font-size:11px; font-weight:600; color:#64748B; cursor:pointer; padding:3px 8px; border-radius:6px; }
.hist-clear:hover { color:#E11D48; background:#FFF1F2; }
.hist-filters { padding:8px 18px 0; display:flex; gap:4px; }
.hist-ft { padding:4px 10px; border-radius:16px; font-size:11px; font-weight:600; color:#64748B; cursor:pointer; }
.hist-ft:hover { background:#F0F9FF; color:#475569; }
.hist-ft.on { background:#0EA5E9; color:#fff; }
.hist-list { flex:1; overflow-y:auto; padding:6px 10px 10px; }
.hist-date { font-size:10px; font-weight:700; color:#64748B; text-transform:uppercase; letter-spacing:.8px; padding:8px 8px 4px; }
.hist-item { display:flex; align-items:flex-start; gap:10px; padding:9px 10px; border-radius:10px; cursor:pointer; position:relative; }
.hist-item:hover { background:#F0F9FF; }
.hist-icon { width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; }
.hist-icon.xnk { background:#DBEAFE; }
.hist-icon.hopdong { background:#A8DCF8; }
.hist-icon.khoahoc { background:#A8DCF8; }
.hist-icon.yhoc { background:#FCE7F3; }
.hist-icon.dich { background:#FEF3C7; }
.hist-icon.baitap { background:#FEE2E2; }
.hist-icon.nghiencuu { background:#DBEAFE; }
.hist-body { flex:1; min-width:0; }
.hist-title { font-size:12px; font-weight:700; color:#1E293B; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hist-meta { display:flex; align-items:center; gap:6px; margin-top:2px; }
.hist-mode { font-size:9px; font-weight:700; padding:1px 5px; border-radius:3px; }
.hist-mode.xnk { background:#DBEAFE; color:#1D4ED8; }
.hist-mode.hopdong { background:#A8DCF8; color:#0369A1; }
.hist-mode.khoahoc { background:#D1FAE5; color:#065F46; }
.hist-mode.yhoc { background:#FCE7F3; color:#9D174D; }
.hist-mode.dich { background:#FEF3C7; color:#92400E; }
.hist-mode.baitap { background:#FEE2E2; color:#991B1B; }
.hist-mode.nghiencuu { background:#DBEAFE; color:#1D4ED8; }
.hist-verdict { font-size:8px; font-weight:800; padding:1px 5px; border-radius:3px; text-transform:uppercase; }
.hist-verdict.pass { background:#D1FAE5; color:#065F46; }
.hist-verdict.flag { background:#FEF3C7; color:#92400E; }
.hist-verdict.block { background:#FEE2E2; color:#991B1B; }
.hist-time { font-size:10px; color:#64748B; }
.hist-del { opacity:0; width:26px; height:26px; border-radius:6px; border:none; background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:13px; margin-top:2px; flex-shrink:0; }
.hist-item:hover .hist-del { opacity:1; }
.hist-del:hover { background:#FFF1F2; }
.hist-foot { padding:8px 18px; border-top:1px solid #F0E8DC; font-size:10px; color:#64748B; }
.hist-empty { text-align:center; padding:40px 20px; font-size:13px; color:#64748B; }
.hist-list::-webkit-scrollbar { width:6px; }
.hist-list::-webkit-scrollbar-track { background:transparent; }
.hist-list::-webkit-scrollbar-thumb { background:rgba(148,163,184,0.3); border-radius:3px; }
.hist-list::-webkit-scrollbar-thumb:hover { background:rgba(148,163,184,0.5); }
.hist-list { scrollbar-width:thin; scrollbar-color:rgba(148,163,184,0.3) transparent; }
.hist-confirm-overlay { position:fixed; inset:0; background:rgba(0,0,0,.3); z-index:10000; display:flex; align-items:center; justify-content:center; }
.hist-confirm-box { background:#fff; border-radius:14px; padding:22px; width:320px; box-shadow:0 12px 40px rgba(0,0,0,.12); text-align:center; }

/* ADMIN */
.ad-content { padding:18px; }
.ad-stats { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.ad-card { flex:1; min-width:120px; background:#F8FAFC; border:1px solid #E2E8F0; border-radius:10px; padding:18px; text-align:center; }
.ad-num { font-size:22px; font-weight:900; color:#0284C7; }
.ad-label { font-size:11px; font-weight:600; color:#64748B; margin-top:2px; }
.ad-sec { margin-bottom:16px; }
.ad-sec-h { font-size:14px; font-weight:700; color:#1E293B; margin-bottom:8px; display:flex; align-items:center; gap:6px; }
.ad-health { font-size:12px; color:#475569; padding:8px 12px; background:#F0F9FF; border-radius:6px; }
.ad-tbl { width:100%; border-collapse:separate; border-spacing:0; font-size:12px; border-radius:8px; overflow:hidden; border:1px solid #E2E8F0; }
.ad-tbl th { background:#F0F9FF; color:#0284C7; font-weight:700; padding:8px 10px; text-align:left; border-bottom:2px solid #0EA5E9; }
.ad-tbl td { padding:7px 10px; border-bottom:1px solid #F1F5F9; }
.ad-tbl tr:hover td { background:#FAFBFC; }
.ad-toolbar { display:flex; gap:8px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.ad-search { padding:6px 12px; border:1.5px solid #E2E8F0; border-radius:6px; font-family:'Be Vietnam Pro',sans-serif; font-size:12px; width:200px; }
.ad-search:focus { outline:none; border-color:#0EA5E9; }
.ad-filter { padding:5px 12px; border:1px solid #E2E8F0; border-radius:6px; background:#fff; font-family:'Be Vietnam Pro',sans-serif; font-size:11px; font-weight:600; color:#475569; cursor:pointer; }
.ad-filter:hover { border-color:#0EA5E9; color:#0284C7; }
.ad-filter.on { background:#0EA5E9; color:#fff; border-color:#0EA5E9; }
.ad-btn-topup, .ad-btn-act { padding:3px 8px; border:1px solid #E2E8F0; border-radius:4px; background:#fff; font-size:11px; cursor:pointer; }
.ad-btn-topup:hover { background:#FFF3E0; border-color:#E65100; }
.ad-btn-act:hover { background:#F0F9FF; border-color:#0EA5E9; }
.ad-pager { display:flex; gap:4px; margin-top:8px; }
.ad-pg { padding:4px 10px; border:1px solid #E2E8F0; border-radius:4px; background:#fff; font-size:11px; cursor:pointer; }
.ad-pg.on { background:#0EA5E9; color:#fff; }
.ad-note { margin-top:12px; font-size:11px; color:#64748B; }
.ad-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.3); z-index:9999; display:flex; align-items:center; justify-content:center; }
.ad-modal { background:#fff; border-radius:14px; padding:24px; width:360px; box-shadow:0 8px 30px rgba(0,0,0,.12); position:relative; }
.ad-modal-close { position:absolute; top:10px; right:12px; border:none; background:none; font-size:16px; cursor:pointer; color:#64748B; }
.ad-modal-title { font-size:16px; font-weight:800; color:#1E293B; margin-bottom:14px; }
.ad-modal-label { font-size:11px; font-weight:700; color:#0284C7; margin-bottom:4px; }
.ad-modal-input { width:100%; padding:8px 12px; border:1.5px solid #E2E8F0; border-radius:6px; font-family:'Be Vietnam Pro',sans-serif; font-size:13px; margin-bottom:10px; }
.ad-modal-input:focus { outline:none; border-color:#0EA5E9; }
.ad-modal-vnd { font-size:12px; color:#E65100; font-weight:700; margin-bottom:10px; }
.ad-modal-actions { display:flex; gap:8px; margin-top:10px; }
.ad-modal-msg { margin-top:8px; font-size:12px; font-weight:700; min-height:16px; }

/* ═══ HISTORY PAGE ═══ */
.hist-page { padding:20px 24px; }
.hist-page-hd { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.hist-page-filters { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.hist-page-list { min-height:200px; }
.hist-page-foot { margin-top:16px; font-size:11px; color:#64748B; text-align:center; }
.hist-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-bottom:1px solid #F1F5F9; cursor:pointer; border-radius:8px; transition:background .15s; }
.hist-item:hover { background:#F8FAFC; }
.hist-icon { font-size:20px; flex-shrink:0; width:32px; text-align:center; }
.hist-body { flex:1; min-width:0; }
.hist-title { font-size:13px; font-weight:600; color:#1E293B; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hist-meta { display:flex; gap:8px; align-items:center; margin-top:3px; }
.hist-mode { font-size:10px; font-weight:700; padding:1px 6px; border-radius:4px; background:#F0F9FF; color:#0284C7; }
.hist-verdict { font-size:10px; font-weight:800; padding:1px 6px; border-radius:4px; }
.hist-verdict.pass { background:#D1FAE5; color:#065F46; }
.hist-verdict.flag { background:#FEF3C7; color:#92400E; }
.hist-verdict.block { background:#FEE2E2; color:#991B1B; }
.hist-time { font-size:10px; color:#64748B; }
.hist-del { border:none; background:none; font-size:14px; cursor:pointer; opacity:.4; flex-shrink:0; }
.hist-del:hover { opacity:1; }
.hist-date { font-size:11px; font-weight:800; color:#0284C7; padding:8px 0 4px; }
.hist-empty { text-align:center; color:#64748B; font-size:13px; padding:40px 0; }
.hist-ft { padding:4px 10px; border:1px solid #E2E8F0; border-radius:6px; font-size:11px; font-weight:600; color:#475569; cursor:pointer; background:#fff; }
.hist-ft:hover { border-color:#0EA5E9; color:#0284C7; }
.hist-ft.on { background:#0EA5E9; color:#fff; border-color:#0EA5E9; }
.hist-clear { font-size:11px; color:#E11D48; font-weight:700; cursor:pointer; }
.hist-clear:hover { text-decoration:underline; }
.hist-confirm-overlay { position:fixed; inset:0; background:rgba(0,0,0,.3); z-index:9999; display:flex; align-items:center; justify-content:center; }
.hist-confirm-box { background:#fff; border-radius:14px; padding:24px; width:320px; box-shadow:0 8px 30px rgba(0,0,0,.12); }
.hist-expire { font-size:9px; font-weight:700; padding:1px 6px; border-radius:3px; }
.expire-green { background:#D1FAE5; color:#065F46; }
.expire-yellow { background:#FEF3C7; color:#92400E; }
.expire-red { background:#FEE2E2; color:#991B1B; }
.hist-td { font-size:10px; color:#059669; font-weight:600; }
.ad-user-hist:hover { text-decoration:underline !important; }

/* ═══ DICH MODE PILLS ═══ */
/* r14: giữ hiện 3 lựa chọn Dịch nhanh / Chuyên ngành / Chuyên sâu trên desktop; mobile vẫn chuyển grid ở media query bên dưới. */
.dich-mode-pills { display:flex; align-items:center; }
/* Dich swap button */
.dich-swap-btn { background:transparent; border:none; font-size:13px; cursor:pointer; padding:0 2px; color:#475569; transition:all .2s; }
.dich-swap-btn:hover { color:#0284C7; transform:rotate(180deg); }

/* Promo badge — sidebar */
.promo-badge{display:inline-block;color:#EF4444;font-size:10px;font-weight:700;margin-left:6px;animation:promoPulse 2s ease-in-out infinite;vertical-align:middle;letter-spacing:.3px}
@keyframes promoPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.1)}}

/* V4.1 dich UI fixes */
.mc textarea.note-input::-webkit-resizer { background: linear-gradient(135deg, transparent 60%, #F59E0B 60%, #F59E0B 70%, transparent 70%, transparent 80%, #F59E0B 80%); width: 14px; height: 14px; }
.mc textarea.note-input { resize: vertical; }
.mc::-webkit-scrollbar { width: 6px; }
.mc::-webkit-scrollbar-track { background: transparent; }
.mc::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.3); border-radius: 3px; }
.mc::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.5); }
.mc { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.3) transparent; }

/* ═══════════════════════════════════════════════════════════════
   QUY CHUẨN NÚT YTHUAT-AI v4 (07/04/2026)
   - TĨNH (passive): viền cam #F57C00 + nền xanh #F0FDF4 + chữ xanh #16A34A
   - ĐỘNG (action):  viền xanh #16A34A + nền cam #FFF3E0 + chữ cam #E65100
   - Hover: đậm 20% (giảm lightness)
   - 3 size: L 44px / M 38px / S 32px
   - Pattern lấy từ chatbox-free-widget.php nút "Dùng thử Trà xanh"
   ═══════════════════════════════════════════════════════════════ */

.tm-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; font-family:'Be Vietnam Pro',sans-serif; font-weight:500; cursor:pointer; box-sizing:border-box; white-space:nowrap; text-decoration:none; transition:background-color .18s ease, border-color .18s ease, color .18s ease; }

/* Sizes */
.tm-btn-l { height:44px; padding:0 24px; font-size:15px; border-radius:9px; }
.tm-btn-m { height:38px; padding:0 18px; font-size:13px; border-radius:8px; }
.tm-btn-s { height:32px; padding:0 14px; font-size:12px; border-radius:6px; }

/* TĨNH — viền cam, nền xanh, chữ xanh */
.tm-btn-tinh { background:#F0FDF4; color:#16A34A; border:1.5px dashed #F57C00; }
.tm-btn-tinh:hover { background:#C0FAD0; color:#118235; border-color:#C46300; }

/* ĐỘNG — viền xanh, nền cam, chữ cam */
.tm-btn-dong { background:#FFF3E0; color:#E65100; border:1.5px dashed #16A34A; }
.tm-btn-dong:hover { background:#FFE0B0; color:#B84000; border-color:#118235; }

/* Disabled — chung cho cả 2 */
.tm-btn-disabled, .tm-btn-tinh.tm-btn-disabled, .tm-btn-dong.tm-btn-disabled {
  background:#F1F5F9; color:#94A3B8; border:1.5px dashed #CBD5E1; cursor:not-allowed;
}
.tm-btn-disabled:hover { background:#F1F5F9; color:#94A3B8; border-color:#CBD5E1; }



/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE SHELL v600-r1 — laptop nhỏ / tablet / mobile
   Mục tiêu: 14–15 inch là chuẩn chính, 29 inch chỉ là bản rộng.
   Không đổi logic nghiệp vụ.
   ═══════════════════════════════════════════════════════════════ */
html, body { max-width:100%; overflow-x:hidden; }
.wrap {
  width:100%;
  max-width:1440px;
}
.ma { min-width:0; }
.tb-t, .tb-u { min-width:0; }
.tb-u { flex-wrap:nowrap; overflow:hidden; }
.tb-user-name {
  display:inline-block;
  max-width:150px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  vertical-align:middle;
}
.mobile-menu-btn {
  display:none;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border:1.5px dashed #16A34A;
  border-radius:9px;
  background:#FFF3E0;
  color:#E65100;
  font-family:'Be Vietnam Pro', sans-serif;
  font-size:20px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  flex-shrink:0;
}
.mobile-menu-btn:hover { background:#FFE0B0; border-color:#118235; color:#B84000; }
.mobile-nav-backdrop {
  position:absolute;
  inset:0;
  z-index:9000;
  background:rgba(15,23,42,.38);
  backdrop-filter:blur(1px);
}
.mobile-nav-backdrop[hidden] { display:none !important; }
.rv-body { max-width:100%; overflow-wrap:anywhere; }
.rv-body table, .ad-tbl {
  display:block;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  white-space:normal;
}
.rv-body table th, .rv-body table td { min-width:120px; }
.lcard, .login-info { max-width:calc(100vw - 32px); }
.ep-card, .hist-confirm-box { max-width:calc(100vw - 32px); }

@media (min-width: 1441px) {
  .wrap { box-shadow:-2px 0 14px rgba(0,0,0,.035), 2px 0 14px rgba(0,0,0,.035); }
}

/* Laptop nhỏ 14–15 inch: giảm hao phí ngang/dọc, vẫn giữ sidebar đầy đủ. */
@media (max-width: 1366px) {
  .wrap { width:100%; max-width:none; }
  .side { width:220px; padding:12px 0; }
  .side-brand { padding:0 14px 10px; margin-bottom:6px; }
  .side-brand .nm { font-size:18px; }
  .si { font-size:13px; padding:7px 8px; gap:7px; }
  .si .ic { font-size:16px; width:19px; }
  .side-contact { font-size:10.5px; line-height:1.55; padding:4px 10px; }
  .side-system { padding:4px 12px 8px !important; }
  .side-system-link { font-size:12px !important; padding:5px 0 !important; }
  .tb { height:46px; padding:0 16px; }
  .ca { padding:16px; }
  .mc { padding:16px; }
  .sg { height:14px; }
  .rv-body { font-size:16px; line-height:1.9; }
}

@media (max-width: 1180px) {
  .side { width:208px; }
  .tb { padding:0 12px; }
  .tb-u { gap:4px; }
  .tb-sep { margin:0 3px !important; }
  .tb-user-name { max-width:96px; }
  .guide-link { padding:3px 8px; }
  .ca { padding:14px; }
  .mc { padding:14px; }
  .cost-row { padding:14px; }
  .cfg-c { padding:14px; }
}

/* Tablet dọc trở xuống: sidebar thành drawer, main dùng trọn chiều ngang. */
@media (max-width: 900px) {
  .sc.on.app { position:absolute; }
  .sc.on.app .side {
    position:absolute;
    top:0;
    left:0;
    bottom:0;
    width:min(82vw, 304px);
    max-width:304px;
    z-index:9100;
    transform:translateX(-105%);
    transition:transform .22s ease;
    box-shadow:10px 0 28px rgba(15,23,42,.18);
  }
  body.mobile-nav-open .sc.on.app .side { transform:translateX(0); }
  body.mobile-nav-open { overflow:hidden; }
  .mobile-menu-btn { display:inline-flex; }
  .ma { width:100%; flex:1 1 auto; }
  .tb { height:50px; padding:0 10px; gap:8px; }
  .tb-t { gap:8px; flex:0 0 auto; }
  .tb-u { margin-left:auto; justify-content:flex-end; }
  .tb-sep { display:none !important; }
  .tb-user-name { display:none !important; }
  .tb-docs-btn { display:none !important; }
  .tb-reload-btn { display:none !important; }
  .ca { padding:12px; }
  .mc { padding:14px; }
  .cfg { flex-direction:column; border-radius:10px; }
  .cfg-c:first-child, .cfg-c:last-child { flex:auto; }
  .cfg-c + .cfg-c { border-left:none; border-top:1.5px solid #E2E8F0; }
  .cost-row { border-radius:0 0 10px 10px; gap:12px; flex-wrap:wrap; }
  .cost-row .btn-run { min-height:44px; }
  .rv-head { padding:14px 16px; gap:10px; flex-wrap:wrap; }
  .rv-td { margin-left:0; }
  .hist-page { padding:14px; }
  .ad-content { padding:14px; }
}

@media (max-width: 640px) {
  .tb { height:48px; }
  .tb-t .flag-btn img { width:20px; height:auto; }
  .tb-history-btn { display:none !important; }
  .tb-u .lo { display:none !important; }
  .td-click { font-size:13px; }
  .av-btn { font-size:20px; min-width:34px; text-align:center; }
  .ca { padding:8px; }
  .mc { padding:12px; }
  .mc .sh { font-size:14px; margin-bottom:10px; padding-bottom:8px; }
  .up-row { padding:14px; gap:10px; flex-wrap:wrap; }
  .up-row .up-btn { width:100%; min-height:44px; }
  .fa { align-items:flex-start; flex-wrap:wrap; }
  .cfg-c { padding:12px; }
  .pills { gap:8px; }
  .p { flex:1 1 calc(50% - 8px); padding:10px 8px; font-size:13px; white-space:normal; min-height:42px; }
  .chk-pill { min-height:42px; white-space:normal; align-items:flex-start; }
  .chk-pill input[type="checkbox"], .chk-pill input[type="radio"] { margin-top:2px; flex-shrink:0; }
  .note-box { padding:12px; }
  .note-input { min-height:96px; font-size:16px; }
  .sp-input, .dich-term-input { font-size:16px; }
  .cost-row { flex-direction:column; align-items:stretch; padding:12px; }
  .cost-row .c1, .cost-td { text-align:left; }
  .cost-row .btn-run { width:100%; padding:11px 16px; font-size:15px; }
  .rtabs, .rv-actions { overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px; flex-wrap:nowrap; }
  .rt, .rv-btn { flex:0 0 auto; }
  .rv-body { font-size:15.5px; line-height:1.82; }
  .rv-body h1 { font-size:19px; margin:22px 0 12px; padding:10px 12px; }
  .rv-body h2 { font-size:17px; margin:20px 0 10px; padding:8px 10px; }
  .rv-body h3 { font-size:16px; }
  .rv-body li { font-size:15.5px; line-height:1.75; }
  .rv-body table { min-width:520px; }
  .fvs { flex-direction:column; }
  .td-card { width:calc(100vw - 24px); padding:22px 16px; }
  .td-bank { flex-direction:column; align-items:center; gap:12px; padding:14px; }
  .td-info { width:100%; }
  .td-row { gap:10px; }
  .hist-page-hd { align-items:flex-start; gap:10px; flex-direction:column; }
  .hist-meta { flex-wrap:wrap; gap:5px; }
  .ad-toolbar { align-items:stretch; }
  .ad-search { width:100%; }
  .ad-card { min-width:calc(50% - 8px); padding:14px; }
  .web-footer { padding:8px; gap:6px; }
}

@media (max-width: 420px) {
  .mobile-menu-btn { width:36px; height:36px; }
  .tb { padding:0 8px; gap:6px; }
  .tb-u { gap:3px; }
  .tb-t { gap:6px; }
  .tb-t .flag-btn:not(.on) { display:none; }
  .tb-td-glass { font-size:16px !important; }
  .hist-btn svg { width:20px; height:20px; }
  .ca { padding:6px; }
  .mc { padding:10px; border-radius:10px; }
  .side-brand .nm { font-size:17px; }
  .p { flex-basis:100%; }
  .btn, .rv-btn, .lbtn-s { min-height:40px; }
  .lcard { padding:24px 20px; }
  .login-info { font-size:11.5px; }
}


/* ═══════════════════════════════════════════════════════════════
   UI SPACING NORMALIZATION v600-r2 — mobile/laptop rhythm
   Mục tiêu: khoảng cách đều, nút dễ bấm, sidebar mobile dễ đọc.
   Không đổi logic nghiệp vụ.
   ═══════════════════════════════════════════════════════════════ */
:root {
  --tm-gap-1: 4px;
  --tm-gap-2: 8px;
  --tm-gap-3: 12px;
  --tm-gap-4: 16px;
  --tm-gap-5: 20px;
  --tm-touch: 44px;
}

.btn, .btn-s, .btn-o,
.cost-row .btn-run,
.tm-btn-tinh, .tm-btn-dong,
.lbtn, .lbtn-s, .rv-btn,
.up-row .up-btn,
#dich-swap-btn,
#btn-dich-attach,
#dich-check-btn,
#dich-term-add,
#dich-phase2-btn {
  line-height: 1.35;
}

select,
.sp-input,
.dich-term-input,
.note-input,
.btn,
.btn-s,
.btn-o,
.cost-row .btn-run,
.tm-btn-tinh,
.tm-btn-dong,
.lbtn,
.lbtn-s,
.rv-btn {
  box-sizing: border-box;
}

@media (max-width: 1180px) {
  .mc { padding: 16px; }
  .mc .sh { margin-bottom: 12px; }
  .sg { height: 16px; }
  .up-row,
  .note-box,
  .cfg-c,
  .cost-row { padding: 14px; }
  .pills { gap: 10px 12px; }
  .chk-pill { gap: 8px; margin-bottom: 0; }
}

@media (max-width: 900px) {
  .sc.on.app .side {
    width: min(84vw, 320px);
    max-width: 320px;
    padding: 14px 0;
  }
  .side-brand { padding: 0 18px 12px; margin-bottom: 8px; }
  .side-brand .nm { font-size: 20px; }
  .side-brand .sl { font-size: 11px; line-height: 1.45; }
  .side-menu { padding: 0 10px; }
  .side-div { height: 10px; margin: 6px 16px; }
  .si {
    min-height: 46px;
    padding: 10px 12px;
    gap: 10px;
    border-radius: 11px;
    font-size: 16px;
    line-height: 1.35;
  }
  .si .ic { width: 24px; font-size: 21px; }
  .ocr-si .ic { font-size: 22px; }
  .tdb { min-height: 44px; padding: 9px 12px; margin: 8px 10px 0; font-size: 14px; }
  .side-bot { padding: 10px 18px; font-size: 12.5px; }
  .side-contact { padding: 8px 12px; font-size: 12.5px; line-height: 1.65; }

  .ca { padding: 14px; }
  .mc { padding: 16px; border-radius: 12px; }
  .mc .sh { gap: 8px; margin-bottom: 12px; padding-bottom: 9px; }
  .cfg { border-radius: 12px; }
  .cfg-c { padding: 14px; }
  .cfg-c .cl, .cl, .note-label { margin-bottom: 8px; }
  .pills { gap: 10px 12px; }
  .chk-pill { min-height: 40px; padding: 3px 2px; gap: 8px; margin-bottom: 0; }
  .chk-pill input[type="checkbox"], .chk-pill input[type="radio"] { width: 18px; height: 18px; }
  .chk-pill span { font-size: 15px; line-height: 1.45; }
  .cost-row { gap: 10px; }
  .cost-row .btn-run { min-height: var(--tm-touch); }
}

@media (max-width: 640px) {
  .ca { padding: 12px; }
  .mc { padding: 14px; border-radius: 12px; }
  .sg { height: 14px; }
  .up-row { padding: 12px; gap: 10px; border-radius: 12px; }
  .up-row .up-btn,
  .cost-row .btn-run,
  .tm-btn-tinh,
  .tm-btn-dong,
  .lbtn,
  .lbtn-s,
  .btn,
  .btn-s,
  .btn-o,
  .rv-btn,
  #btn-dich-attach,
  #dich-check-btn,
  #dich-term-add,
  #dich-phase2-btn {
    min-height: var(--tm-touch);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .pills { gap: 8px 10px; }
  .chk-pill { min-height: 38px; padding: 2px 0; align-items: center; }
  .chk-pill span { font-size: 15px; }
  .p { min-height: var(--tm-touch); padding: 10px 10px; }

  .dich-mode-banner {
    margin-bottom: 12px !important;
    padding: 12px 14px !important;
    gap: 8px !important;
    border-radius: 12px !important;
  }
  .dich-mode-pills {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px !important;
  }
  .dich-mode-pills .chk-pill {
    min-height: 38px !important;
    padding: 2px 0 !important;
  }
  .dich-mode-banner > span {
    display: block;
    width: 100%;
    margin-top: 4px;
  }
  .dich-style-section { margin-top: 14px !important; }
  .dich-style-section .cl {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .dich-style-section .cl > span:first-child { flex: 0 0 100%; }
  .dich-style-section .cl > span:last-child { line-height: 1.55; }
  .dich-style-pills {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px !important;
  }
  .dich-style-pills .chk-pill {
    min-height: 42px;
    padding: 6px 8px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #FFFFFF;
  }
  .dich-style-pills .chk-pill:has(input:checked) {
    border-color: #7DD3FC;
    background: #F0F9FF;
  }

  .dich-lang-row {
    margin-top: 14px !important;
    gap: 8px !important;
    align-items: stretch !important;
  }
  #dich-source-lang,
  #dich-target-lang {
    flex: 1 1 128px;
    min-width: 0 !important;
    height: var(--tm-touch);
    font-size: 15px !important;
  }
  #dich-swap-btn {
    width: var(--tm-touch);
    height: var(--tm-touch);
    padding: 0 !important;
    flex: 0 0 var(--tm-touch);
    font-size: 16px !important;
  }
  #dich-upload-inline {
    width: 100%;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  #dich-upload-inline:not([style*="display:none"]):not([style*="display: none"]) {
    display: flex !important;
  }
  #dich-upload-inline > span:first-child,
  .dich-lang-row > span[style*="CBD5E1"] { display: none !important; }
  #btn-dich-attach { flex: 1 1 160px; padding: 8px 12px !important; }
  #dich-hs-box {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px !important;
  }
  #dich-text-block { margin-top: 12px !important; }
  #dich-text-block .cl { margin-bottom: 8px !important; }
  #dich-text { min-height: 128px; }
  #dich-text-hint-overlay {
    top: 12px !important;
    left: 14px !important;
    right: 14px !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  .note-box,
  .cfg-c,
  .cost-row { padding: 12px; }
  .cost-row { gap: 10px !important; }
  .cost-row .c1 { line-height: 1.55; }
  .cost-row .btn-run { padding: 10px 14px; }
  .web-footer { margin-top: 12px; }

}

@media (max-width: 420px) {
  .ca { padding: 10px; }
  .mc { padding: 12px; }
  .tb { padding: 0 8px; }
  .dich-style-pills { grid-template-columns: 1fr 1fr; }
  .dich-style-pills .chk-pill { padding: 6px 7px; }
  .dich-mode-pills .chk-pill span,
  .dich-style-pills .chk-pill span { font-size: 15px; }
  #dich-source-lang { flex-basis: calc(50% - 28px); }
  #dich-target-lang { flex-basis: calc(50% - 28px); }
  .side-brand .nm { font-size: 20px; }
  .si { font-size: 16px; min-height: 48px; }

}


/* ═══════════════════════════════════════════════════════════════
   SIDEBAR MOBILE COMPACT v600-r6 — gom nhóm, thêm đăng xuất.
   Không đổi logic đăng xuất: dùng lại #btn-logout* trong app-core.js.
   ═══════════════════════════════════════════════════════════════ */
.side-section { display:flex; flex-direction:column; gap:2px; }
.side-logout-link {
  display:none;
  width:100%;
  border:0;
  background:transparent;
  font-family:inherit;
  cursor:pointer;
  text-align:left;
}

@media (max-width: 900px) {
  .sc.on.app .side {
    width:min(82vw, 312px);
    max-width:312px;
    padding:14px 0 10px;
  }
  .sc.on.app .side-brand {
    padding:0 20px 10px;
    margin-bottom:4px;
  }
  .sc.on.app .side-brand .nm { font-size:21px; letter-spacing:.8px; }
  .sc.on.app .side-brand .sl { font-size:11.5px; }
  .sc.on.app .side-menu {
    padding:0 14px 12px;
    display:flex;
    flex-direction:column;
    gap:0;
  }
  .sc.on.app .side-section-main,
  .sc.on.app .side-section-pay { gap:3px; }
  .sc.on.app .si {
    min-height:42px;
    padding:8px 10px;
    gap:10px;
    border-radius:11px;
    font-size:16px;
    line-height:1.3;
  }
  .sc.on.app .si .ic { width:24px; font-size:21px; }
  .sc.on.app .side-div {
    height:1px;
    margin:9px 4px;
    background:rgba(14,165,233,.18);
  }
  .sc.on.app .side-td { padding:3px 0 0; }
  .sc.on.app .side-td .td-btn {
    width:100%;
    min-height:42px;
    border-radius:12px;
    font-size:15px;
    font-weight:900;
  }
  .sc.on.app .side-system {
    padding:0 2px 2px !important;
    display:flex;
    flex-direction:column;
    gap:2px;
  }
  .sc.on.app .side-system-link {
    min-height:36px;
    display:flex !important;
    align-items:center;
    width:100%;
    box-sizing:border-box;
    padding:7px 9px !important;
    border-radius:10px;
    color:#334155;
    font-size:14.5px !important;
    font-weight:700;
    line-height:1.25;
  }
  .sc.on.app .side-system-link:hover { background:rgba(255,255,255,.55); color:#0284C7; }
  .sc.on.app .side-logout-link {
    color:#B91C1C;
    background:rgba(254,226,226,.42);
  }
  .sc.on.app .side-logout-link:hover {
    color:#991B1B;
    background:rgba(254,226,226,.72);
  }
  .sc.on.app .side-contact {
    margin:5px 4px 0;
    padding:7px 8px 2px;
    border-top:1px solid rgba(14,165,233,.16);
    color:#475569;
    font-size:12px;
    line-height:1.55;
    font-weight:650;
  }
}

@media (max-width: 420px) {
  .sc.on.app .side { width:min(84vw, 304px); }
  .sc.on.app .side-menu { padding-left:12px; padding-right:12px; }
  .sc.on.app .si { min-height:41px; font-size:16px; padding-top:7px; padding-bottom:7px; }
  .sc.on.app .side-system-link { min-height:35px; font-size:14px !important; }
}
.side-system .side-logout-link { display:none; }

/* ═══════════════════════════════════════════════════════════════
   AUTH MOBILE COMPACT v600-r12 — giảm nút Google/Zalo khoảng 20%.
   Chỉ chỉnh UI topbar khi chưa đăng nhập; không đổi OAuth/backend.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .tb-u .tm-auth-wrap {
    gap:4px !important;
    padding:2px !important;
  }
  .tb-u .tm-auth-wrap .tm-auth-btn {
    min-height:34px !important;
    padding:4px 8px !important;
    gap:4px !important;
    border-radius:7px !important;
    font-size:10.5px !important;
    line-height:1.2 !important;
  }
  .tb-u .tm-auth-wrap .tm-auth-btn svg {
    width:10px !important;
    height:10px !important;
  }
  .tb-u .tm-auth-wrap .zi-s {
    width:12px !important;
    height:12px !important;
    border-radius:3px !important;
    font-size:8px !important;
  }
}

@media (max-width: 420px) {
  .tb-u .tm-auth-wrap .tm-auth-btn {
    min-height:32px !important;
    padding:4px 7px !important;
    font-size:10px !important;
  }
}
/* DREAMS apps: Hoc duong + Be yeu */
.dreams-ai-box button:disabled{opacity:.72;cursor:wait}
.dreams-ai-answer{margin-top:12px;border-top:1px solid #e2e8f0;padding-top:12px}
.dreams-ai-answer:empty{display:none}
.dreams-ai-answer h3{margin:0 0 8px;color:#1267bf;font-size:15px}
.dreams-app-beyeu .dreams-ai-answer h3{color:#159447}
.dreams-ai-answer p{font-size:14px;line-height:1.65;color:#263445;margin:8px 0}
.dreams-app{max-width:1180px;margin:0 auto;padding:18px 18px 28px;color:#102033;font-family:'Be Vietnam Pro',system-ui,Arial,sans-serif}.dreams-app-head{display:flex;align-items:center;gap:14px;margin-bottom:12px}.dreams-avatar{width:54px;height:54px;border-radius:14px;display:grid;place-items:center;font-weight:900;color:#fff;background:#1d73d4;box-shadow:0 8px 24px rgba(29,115,212,.2);font-size:16px;flex:0 0 auto}.dreams-avatar-2d{--voice-amp:0;position:relative;overflow:hidden;background:linear-gradient(180deg,#dbeafe,#1d73d4);border:2px solid rgba(255,255,255,.78)}.dreams-avatar-tieumai{background:linear-gradient(180deg,#dcfce7,#16a34a)}.dreams-avatar-face{position:absolute;left:11px;right:11px;top:12px;height:29px;border-radius:13px 13px 12px 12px;background:#ffe4c7;box-shadow:inset 0 -2px 0 rgba(120,53,15,.08)}.dreams-avatar-hair{position:absolute;left:12px;right:12px;top:7px;height:15px;border-radius:14px 14px 8px 8px;background:#27364a}.dreams-avatar-tieumai .dreams-avatar-hair{background:#55311f}.dreams-avatar-eye{position:absolute;top:11px;width:4px;height:4px;border-radius:50%;background:#172033;animation:dreamsBlink 4.8s infinite}.dreams-avatar-eye.left{left:8px}.dreams-avatar-eye.right{right:8px}.dreams-avatar-mouth{position:absolute;left:50%;bottom:6px;width:12px;height:4px;transform:translateX(-50%) scaleY(calc(1 + var(--voice-amp) * 3.5));transform-origin:center top;border-radius:0 0 999px 999px;background:#a33a32;transition:height .08s linear,transform .08s linear}.dreams-avatar-badge{position:absolute;left:50%;bottom:2px;transform:translateX(-50%);font-size:9px;font-weight:900;color:#fff;background:rgba(15,23,42,.45);border-radius:999px;padding:1px 5px}.dreams-avatar-2d[data-state="thinking"]{animation:dreamsThink 1.05s ease-in-out infinite}.dreams-avatar-2d[data-state="speaking"]{animation:dreamsSpeak 1.2s ease-in-out infinite}.dreams-avatar-2d[data-state="speaking"] .dreams-avatar-mouth,.dreams-avatar-fallback-speak .dreams-avatar-mouth{height:calc(4px + var(--voice-amp) * 12px)}@keyframes dreamsBlink{0%,94%,100%{transform:scaleY(1)}96%{transform:scaleY(.12)}}@keyframes dreamsThink{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}@keyframes dreamsSpeak{0%,100%{transform:translateY(0)}50%{transform:translateY(-1px)}}.dreams-app-beyeu .dreams-avatar{background:#16a34a}.dreams-kicker{font-size:11px;font-weight:800;color:#64748b;letter-spacing:.04em}.dreams-app h1{margin:0;font-size:26px;line-height:1.2;color:#1267bf;font-weight:900}.dreams-app-beyeu h1{color:#159447}.dreams-app p{margin:5px 0 0;color:#536176;font-size:14px;line-height:1.55}.dreams-safety-note{border:1px solid #dbe7f5;background:#f8fbff;border-left:4px solid #1d73d4;border-radius:8px;padding:10px 12px;margin:12px 0 14px;font-size:13px;line-height:1.55;color:#334155}.dreams-app-beyeu .dreams-safety-note{border-left-color:#16a34a;background:#f7fff9}.dreams-tabs{display:flex;gap:12px;flex-wrap:wrap;margin:14px 0}.dreams-tab{border:1px solid #d6e3f2;background:#fff;border-radius:8px;padding:10px 14px;font-weight:800;color:#334155;cursor:pointer;display:flex;align-items:center;gap:8px;box-shadow:0 2px 8px rgba(15,23,42,.05)}.dreams-tab.active{background:#1d73d4;color:#fff;border-color:#1d73d4}.dreams-app-beyeu .dreams-tab.active{background:#16a34a;border-color:#16a34a}.dreams-pill-count{background:rgba(15,23,42,.08);border-radius:999px;padding:2px 8px;font-size:12px}.dreams-tab.active .dreams-pill-count{background:rgba(255,255,255,.2)}.dreams-categories{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:12px 0 18px}.dreams-cat{border:1.5px solid #1d73d4;background:#f8fbff;color:#0f172a;border-radius:8px;min-height:42px;padding:8px 12px;font-weight:800;cursor:pointer;display:flex;align-items:center;gap:8px}.dreams-cat.active{background:#e8f2ff;box-shadow:inset 0 0 0 1px #1d73d4}.dreams-app-beyeu .dreams-cat{border-color:#16a34a;background:#fbfffb}.dreams-app-beyeu .dreams-cat.active{background:#ecfdf3;box-shadow:inset 0 0 0 1px #16a34a}.dreams-search{display:flex;align-items:center;gap:10px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;padding:0 14px;margin:14px 0 18px;min-height:52px}.dreams-search input{border:0;outline:0;width:100%;font-size:15px;background:transparent;color:#172033}.dreams-workspace{display:grid;grid-template-columns:minmax(300px,420px) 1fr;gap:16px;align-items:start}.dreams-list-panel,.dreams-detail-panel{border:1px solid #d8e5f4;background:#fff;border-radius:8px;box-shadow:0 8px 28px rgba(15,23,42,.05);overflow:hidden}.dreams-list-head{padding:13px 16px;border-bottom:1px solid #e2e8f0;font-weight:900;color:#526071;background:#f8fafc}.dreams-list{max-height:620px;overflow:auto;padding:10px}.dreams-card{width:100%;text-align:left;border:1px solid #e2e8f0;background:#f8fbff;border-radius:8px;padding:12px;margin-bottom:10px;cursor:pointer;display:grid;grid-template-columns:36px 1fr auto;gap:10px;align-items:center}.dreams-card:hover,.dreams-card.active{border-color:#1d73d4;background:#eef6ff}.dreams-app-beyeu .dreams-card:hover,.dreams-app-beyeu .dreams-card.active{border-color:#16a34a;background:#f0fdf4}.dreams-card-icon{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;background:#fff;font-size:17px}.dreams-card-title{font-weight:850;font-size:14px;line-height:1.45;color:#0f172a}.dreams-card-meta{font-size:12px;color:#64748b;margin-top:3px}.dreams-card-arrow{font-weight:900;color:#1d73d4}.dreams-detail-panel{min-height:420px;padding:18px}.dreams-empty{text-align:center;padding:44px 12px;color:#64748b}.dreams-empty-avatar{margin:0 auto 12px;width:58px;height:58px;border-radius:16px;background:#edf6ff;color:#1d73d4;display:grid;place-items:center;font-weight:900}.dreams-detail-title{font-size:22px;margin:0 0 6px;color:#0f172a;font-weight:900}.dreams-detail-sub{font-size:13px;color:#64748b;margin-bottom:12px}.dreams-risk{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:850;background:#e0f2fe;color:#0369a1;margin-bottom:12px}.dreams-risk.critical{background:#fee2e2;color:#b91c1c}.dreams-risk.medium{background:#fef3c7;color:#a16207}.dreams-section{border-top:1px solid #e2e8f0;padding-top:13px;margin-top:13px}.dreams-section h3{font-size:15px;margin:0 0 8px;color:#1267bf}.dreams-app-beyeu .dreams-section h3{color:#159447}.dreams-section p,.dreams-section li{font-size:14px;line-height:1.65;color:#263445}.dreams-section ul{padding-left:18px;margin:8px 0}.dreams-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.dreams-actions button{border:1px solid #d6e3f2;background:#fff;border-radius:8px;padding:8px 12px;font-weight:800;cursor:pointer;color:#334155}.dreams-actions button:hover{border-color:#1d73d4;color:#1d73d4}.dreams-feedback{font-size:13px;color:#16a34a;margin-top:10px;min-height:20px}.dreams-loading,.dreams-error{padding:20px;color:#64748b}.dreams-error{color:#b91c1c;background:#fff7f7;border:1px solid #fecaca;border-radius:8px}.dreams-ai-box{border:1px dashed #cbd5e1;background:#f8fafc;border-radius:8px;padding:12px;margin-top:14px}.dreams-ai-box textarea{width:100%;min-height:76px;border:1px solid #cbd5e1;border-radius:8px;padding:10px;font:inherit;resize:vertical}.dreams-ai-box button{margin-top:8px;border:0;background:#1d73d4;color:#fff;border-radius:8px;padding:9px 13px;font-weight:850}.dreams-app-beyeu .dreams-ai-box button{background:#16a34a}@media (max-width:900px){.dreams-workspace{grid-template-columns:1fr}.dreams-list{max-height:none}.dreams-app{padding:14px 10px}.dreams-app h1{font-size:22px}.dreams-card{grid-template-columns:34px 1fr auto}.dreams-tabs{gap:8px}.dreams-tab{flex:1;justify-content:center;min-width:160px}}@media print{body *{visibility:hidden}.dreams-detail-panel,.dreams-detail-panel *{visibility:visible}.dreams-detail-panel{position:absolute;left:0;top:0;width:100%;box-shadow:none;border:0}.dreams-actions,.dreams-ai-box{display:none!important}}
