:root {
  --bg: #120e11;
  --surface: #1b1519;
  --surface-2: #241c21;
  --border: rgba(235, 193, 134, 0.18);
  --border-strong: rgba(235, 193, 134, 0.42);
  --gold: #ebb97a;
  --gold-hi: #ffe6c4;
  --text: #f4ecf0;
  --muted: #b8a8b0;
  --ok: #44d395;
  --user-bg: linear-gradient(135deg, #c99252, #e5b77c);
  --user-text: #1b1209;
  --zalo: #0068ff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.48;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.supShell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 780px;
  margin: 0 auto;
  background: radial-gradient(circle at top right, rgba(235, 185, 122, 0.09), transparent 46%), var(--bg);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.supHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: rgba(27, 21, 25, 0.94);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

.supBrand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.supLogo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #e7b575, #9f6a34);
  color: #191009;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(231, 181, 117, 0.25);
}

.supBrandText {
  min-width: 0;
}

.supBrandText h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.supOnline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.supDot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(68, 211, 149, 0.75);
}

.supHeaderActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.supIconBtn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.supIconBtn:hover {
  border-color: var(--gold);
}

.supZaloBtn {
  padding: 7px 11px;
  border-radius: 9px;
  background: var(--zalo);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.supQuickBar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(20, 15, 19, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
  flex: 0 0 auto;
}

.supQuickBar::-webkit-scrollbar {
  display: none;
}

.supQuickLink {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.supQuickLink.isGold {
  border-color: var(--border-strong);
  background: rgba(235, 185, 122, 0.14);
  color: var(--gold-hi);
}

.supMessages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.supWelcome {
  background: linear-gradient(160deg, rgba(235, 185, 122, 0.11), rgba(27, 21, 25, 0.92));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.supWelcomeBadge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--gold);
  margin-bottom: 6px;
}

.supWelcome h2 {
  margin: 0 0 6px;
  font-size: 16.5px;
  color: var(--gold-hi);
  line-height: 1.35;
}

.supWelcome p {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--muted);
}

.supStarters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supChip {
  padding: 8px 11px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.supChip:hover,
.supChip:active {
  border-color: var(--gold);
  background: rgba(235, 185, 122, 0.16);
  color: var(--gold-hi);
}

.supRow {
  display: flex;
  flex-direction: column;
  max-width: 90%;
}

.supRow.isUser {
  align-self: flex-end;
  align-items: flex-end;
}

.supRow.isBot {
  align-self: flex-start;
  align-items: flex-start;
}

.supBubble {
  padding: 11px 14px;
  border-radius: 15px;
  font-size: 14px;
  word-break: break-word;
}

.supRow.isUser .supBubble {
  background: var(--user-bg);
  color: var(--user-text);
  font-weight: 600;
  border-bottom-right-radius: 5px;
}

.supRow.isBot .supBubble {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 5px;
}

.supUserImg {
  max-width: 220px;
  max-height: 200px;
  border-radius: 10px;
  display: block;
  margin-bottom: 7px;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.supPara {
  margin: 0;
}

.supPara + .supPara {
  margin-top: 6px;
}

.supPara.isHeading {
  color: var(--gold-hi);
  font-weight: 700;
}

.supPara.isBullet {
  padding-left: 4px;
}

.supCode {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--gold-hi);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.supBtnRow {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.supActionLink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: rgba(235, 185, 122, 0.16);
  color: var(--gold-hi);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.supActionLink.isZalo {
  border-color: #3a8cff;
  background: rgba(0, 104, 255, 0.24);
  color: #dcebff;
}

.supMeta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.supComposerWrap {
  flex: 0 0 auto;
  padding: 8px 12px max(10px, env(safe-area-inset-bottom));
  background: rgba(24, 18, 22, 0.98);
  border-top: 1px solid var(--border);
}

.supImgPreview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}

.supImgThumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 7px;
  flex: 0 0 auto;
}

.supImgInfo {
  flex: 1 1 auto;
  min-width: 0;
}

.supImgName {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.supImgSub {
  font-size: 11px;
  color: var(--muted);
}

.supImgRemove {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.supComposer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.supAttachBtn {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--gold-hi);
  font-size: 18px;
  cursor: pointer;
  flex: 0 0 auto;
}

.supAttachBtn:hover {
  border-color: var(--gold);
}

.supInput {
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 110px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
  resize: none;
  outline: none;
}

.supInput:focus {
  border-color: var(--gold);
}

.supSendBtn {
  height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, #c99252, #ebb97a);
  color: #1b1209;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
}

.supSendBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.supFootNote {
  margin-top: 6px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.supFootNote a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
}
