/* Cheezy Hoàn Tiền — maroon #6B1D2A, gold #C9A86A, cream #F5EFE6 */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #F5EFE6;
  color: #2b2320;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
a { color: #6B1D2A; }
h2 { color: #6B1D2A; font-size: 1.25rem; margin: 0 0 12px; }
h3 { color: #6B1D2A; font-size: 1.05rem; margin: 20px 0 8px; }

/* Header */
.site-header { background: #6B1D2A; color: #fff; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  background: #C9A86A; color: #6B1D2A;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.15rem; }
.brand-text small { color: #e8d9b8; font-size: 0.85rem; }
.user-chip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-name { font-weight: 700; }
.user-code {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; padding: 2px 10px; font-size: 0.85rem;
  word-break: break-all;
}

/* Cards & layout */
main { padding: 20px 0 32px; }
.card {
  background: #fff; border: 1px solid #e5dcc8; border-radius: 16px;
  padding: 20px; margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(107,29,42,.08);
}
.two-col { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 760px) {
  .wrap { max-width: 1080px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .two-col .card { height: 100%; }
}

/* Buttons */
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-size: 1rem; font-weight: 700; line-height: 1.3;
  padding: 12px 20px; border-radius: 999px; text-align: center;
  text-decoration: none; font-family: inherit;
}
.btn-block { display: block; width: 100%; }
.btn-primary { background: #6B1D2A; color: #fff; }
.btn-primary:hover { background: #571623; }
.btn-secondary { background: #C9A86A; color: #2b2320; }
.btn-secondary:hover { background: #bfa06a; }
.btn-ghost { background: transparent; color: #6B1D2A; border: 2px solid #6B1D2A; }
.btn-ghost-light { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); padding: 8px 14px; }
.btn-small { padding: 8px 14px; font-size: 0.9rem; }
.btn-danger { background: #fff; color: #8a1f1f; border: 2px solid #8a1f1f; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.row-btns .btn { flex: 1 1 140px; }

/* Forms */
label { display: block; font-weight: 600; margin-bottom: 12px; }
input, select {
  display: block; width: 100%; margin-top: 6px;
  padding: 12px; font-size: 1rem; font-family: inherit;
  border: 1.5px solid #cbbfa5; border-radius: 8px; background: #fff; color: #2b2320;
}
input:focus, select:focus { outline: 3px solid rgba(201,168,106,.55); border-color: #6B1D2A; }
.hint { color: #6d6156; font-size: 0.9rem; margin: 8px 0; }
.form-error { color: #8a1f1f; background: #fbeeee; border: 1px solid #e5b4b4; border-radius: 8px; padding: 10px 12px; }
.form-note { color: #3f5a2e; background: #eef4e6; border: 1px solid #bcd3a8; border-radius: 8px; padding: 10px 12px; }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  flex: 1; padding: 12px; font-size: 1rem; font-weight: 700; font-family: inherit;
  background: #F5EFE6; color: #6B1D2A; border: 2px solid #e5dcc8; border-radius: 999px; cursor: pointer;
}
.tab.active { background: #6B1D2A; color: #fff; border-color: #6B1D2A; }

/* Platforms */
.platforms { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.platform {
  flex: 1 1 100px; padding: 12px 8px; font-size: 1rem; font-weight: 700; font-family: inherit;
  background: #fff; color: #6B1D2A; border: 2px solid #C9A86A; border-radius: 999px; cursor: pointer;
}
.platform.active { background: #6B1D2A; color: #fff; border-color: #6B1D2A; }
.platform-soon { opacity: .55; border-style: dashed; }
.soon-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  background: #eee3c8; color: #6B1D2A; border-radius: 999px; padding: 2px 8px; margin-left: 4px;
}

/* Generate result */
.result { border-top: 1px solid #e5dcc8; margin-top: 16px; padding-top: 16px; }
.result h3 { margin-top: 0; }
.result-link {
  word-break: break-all; background: #F5EFE6; border: 1px solid #e5dcc8;
  border-radius: 8px; padding: 10px 12px; margin: 8px 0;
}
.result-meta { margin: 12px 0; }
.result-meta div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid #f0e9d8;
}
.result-meta dt { color: #6d6156; }
.result-meta dd { margin: 0; font-weight: 700; text-align: right; }

/* Wallet */
.wallet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.wallet-box {
  background: #F5EFE6; border: 1px solid #e5dcc8; border-radius: 16px;
  padding: 12px 8px; text-align: center;
}
.wallet-box span { display: block; font-size: 0.85rem; color: #6d6156; }
.wallet-box strong { display: block; font-size: 1.05rem; color: #6B1D2A; word-break: break-word; }

/* Item lists (orders / links / admin) */
.item-list { display: grid; gap: 12px; }
.item {
  border: 1px solid #e5dcc8; border-radius: 16px; padding: 14px;
  background: #fffdf8;
}
.item .item-title { font-weight: 700; color: #6B1D2A; word-break: break-word; }
.item .item-lines { margin: 8px 0; font-size: 0.95rem; }
.item .item-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.item .item-lines span:first-child { color: #6d6156; flex: 0 0 auto; }
.item .item-lines span:last-child { text-align: right; word-break: break-word; }
.item .item-lines .money { font-weight: 700; }
.item-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.item-actions .btn { flex: 1 1 120px; }
.status {
  display: inline-block; font-size: 0.85rem; font-weight: 700;
  border-radius: 999px; padding: 3px 10px;
}
.status-placed { background: #fdf3d7; color: #7a5b00; }
.status-approved { background: #e6f2dd; color: #2e5b1e; }
.status-rejected { background: #fbeeee; color: #8a1f1f; }
.status-created { background: #eef0f7; color: #3d4a7a; }
.empty { color: #6d6156; margin: 4px 0; }
.truncate { word-break: break-all; }
.bank-full { font-weight: 700; word-break: break-all; }

/* Fee table */
.fee-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.fee-table th, .fee-table td { border: 1px solid #e5dcc8; padding: 10px; text-align: left; vertical-align: top; }
.fee-table th { background: #6B1D2A; color: #fff; }
.fee-table td:first-child { font-weight: 700; color: #6B1D2A; }

/* FAQ */
.faq details { border: 1px solid #e5dcc8; border-radius: 16px; padding: 12px 14px; margin-top: 10px; }
.faq summary { font-weight: 700; color: #6B1D2A; cursor: pointer; }
.faq p { margin: 8px 0 0; }

/* Admin */
.admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.due-card { border: 2px solid #b3261e; background: #fff8f5; }
.due-card h2 { color: #b3261e; }
.reset-box { margin-top: 10px; border-top: 1px dashed #e5dcc8; padding-top: 10px; }
.reset-box label { margin-bottom: 8px; }

/* Footer */
.site-footer { border-top: 1px solid #e5dcc8; padding: 20px 0 32px; color: #6d6156; font-size: 0.9rem; }
.site-footer p { margin: 4px 0; }
