/* CSGT-PHP style */
:root {
  --brand: #dc3545; --brand-600: #c82333;
  --ink: #16202c; --ink-soft: #4a5768; --muted: #7a8798;
  --line: #dde3ea; --bg: #eef1f6; --surface: #fff;
  --ok: #12764a; --ok-bg: #e8f6ef; --err: #b3261e; --err-bg: #fdecea;
}
* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body { font-family: "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }
.page { min-height: 100vh; display: flex; flex-direction: column; }

/* Banner */
.csgt-banner { position: relative; overflow: hidden; background: url("pattern-bg.jpg") center center no-repeat; background-size: 75%; background-color: #f7e195; border-bottom: 1px solid #e6d49a; }
.csgt-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,248,230,.85), rgba(255,245,220,.6) 55%, rgba(255,245,220,.35)); }
.csgt-banner-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 16px; color: inherit; }
.brand:hover { text-decoration: none; }
.csgt-logo { width: 66px; height: 82px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-org { font-size: 21px; font-weight: 700; color: #111; }
.brand-title { font-size: 26px; font-weight: 800; color: #d0101c; }

/* Navbar */
.csgt-navbar { display: flex; background: #fdf1de; padding: 10px 16px; border-top: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5; }
.csgt-navbar-container { display: flex; align-items: center; justify-content: space-between; max-width: 1250px; margin: 0 auto; width: 100%; gap: 12px; }
.csgt-navbar-left { display: flex; align-items: center; flex-wrap: wrap; }
.csgt-quick-link { display: inline-flex; align-items: center; padding: 10px 14px; color: #182940; font-size: 13px; font-weight: 500; text-transform: uppercase; white-space: nowrap; border-left: 1px solid #e0d5bd; }
.csgt-navbar-left .csgt-quick-link:first-child { border-left: 0; }
.csgt-quick-link.is-static { cursor: default; }
.csgt-navbar-right { display: flex; align-items: center; gap: 8px; }
.csgt-navbar-right .csgt-quick-link { border-left: 0; }
.btn-solid { padding: 9px 18px; border: 1px solid var(--brand); border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-block; }
.btn-solid:hover { background: var(--brand-600); color: #fff; text-decoration: none; }

/* Auth card */
.page-body { flex: 1; display: flex; justify-content: center; padding: 34px 20px 56px; background: #f8f9fa; }
.register-container { width: 100%; display: flex; justify-content: center; }
#register-form { max-width: 600px; width: 100%; background: #fff; border-radius: 10px; box-shadow: 0 0 20px rgba(0,0,0,.1); padding: 2rem; height: fit-content; }
.register-header { text-align: center; margin-bottom: 2rem; }
.register-header h1 { margin: 0; font-size: 24px; font-weight: 700; }
.row-g3 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.col-12 { grid-column: 1 / -1; }
.mb-3 { margin-bottom: 1rem; }
.form-label { display: block; font-weight: 500; margin-bottom: .5rem; font-size: 14px; }
.form-control { height: 45px; border-radius: 8px; border: 1px solid #dee2e6; padding: .75rem 1rem; width: 100%; font-size: 14.5px; font-family: inherit; }
.form-control:focus { outline: none; border-color: #dc3545; box-shadow: 0 0 0 .2rem rgba(220,53,69,.15); }
.pw-wrap { position: relative; display: block; }
.pw-wrap .form-control { padding-right: 70px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #dc3545; font-size: 12.5px; font-weight: 700; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.err-msg { font-size: 12.5px; color: var(--err); font-weight: 500; }
.btn-register { height: 48px; border-radius: 8px; font-weight: 500; font-size: 16px; background: #dc3545; color: #fff; border: 0; margin-top: 1rem; width: 100%; display: block; text-align: center; padding: 12px; cursor: pointer; }
.btn-register:hover { background: #c82333; }
.login-link { text-align: center; margin-top: 1.5rem; color: #6c757d; font-size: 14px; }
.login-link a { color: #dc3545; font-weight: 500; }
.alert { margin-bottom: 20px; padding: 12px 14px; border-radius: 8px; font-size: 13.5px; border: 1px solid transparent; }
.alert-error { background: var(--err-bg); border-color: #f3c6c2; color: #8d1a14; }
.alert-ok { background: var(--ok-bg); border-color: #bfe4d2; color: #0d5c39; }

/* Footer */
.site-footer { background: #1d2733; color: #9fb0c4; font-size: 13px; margin-top: auto; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 26px 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
.footer-inner h4 { margin: 0 0 10px; color: #fff; font-size: 13.5px; }
.footer-inner p { margin: 0 0 6px; }
.site-footer a { color: #ffb3ba; }
.foot-static { color: #ffb3ba; }
.footer-bottom { border-top: 1px solid #2c3a4b; padding: 14px 24px; text-align: center; font-size: 12.5px; color: #7f92a8; }

/* Dashboard xe */
.xe-plain { width: 100%; max-width: 560px; margin: 0 auto; padding: 22px 16px 28px; }
.xe-topbar { display: flex; align-items: center; margin-bottom: 12px; }
.xe-topbar-right { justify-content: flex-end; }
.xe-history { border: 1px solid #e5e0d5; background: #faf7ef; color: #4a5768; font-size: 13px; border-radius: 20px; padding: 7px 14px; cursor: default; }
.xe-title { margin: 0 0 10px; font-size: 20px; color: #182940; }
.xe-desc { margin: 0 0 18px; font-size: 13.5px; color: #4a5768; line-height: 1.6; }
.xe-cta { display: inline-block; border: 0; background: #a31621; color: #fff; font-size: 14px; font-weight: 600; border-radius: 24px; padding: 12px 28px; cursor: pointer; margin-bottom: 30px; box-shadow: 0 4px 12px rgba(163,22,33,.3); }
.xe-cta:hover { background: #7d0f18; color: #fff; text-decoration: none; }
.xe-empty { text-align: center; padding: 40px 10px 20px; color: #6c757d; }
.xe-empty p { font-size: 13.5px; }
.xe-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.xe-list li { border: 1px solid #dee2e6; background: #fff; border-radius: 8px; padding: 12px 14px; }
.xe-list li b { color: #182940; }
.xe-list li span { font-size: 13px; color: #6c757d; display: block; }

/* Form khai */
.dk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.dk-head h1 { margin: 0; font-size: 17px; color: #182940; }
.dk-back { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #182940; font-size: 20px; cursor: pointer; text-decoration: none; }
.dk-back:hover { background: #eceff3; text-decoration: none; }
.dk-field { margin-bottom: 14px; }
.dk-label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; }
.dk-label .req { color: var(--err); }
.dk-control { width: 100%; min-height: 44px; border: 1px solid #dee2e6; border-radius: 8px; background: #fff; padding: 10px 12px; font-size: 14.5px; font-family: inherit; }
.dk-control:focus { outline: none; border-color: #dc3545; box-shadow: 0 0 0 .2rem rgba(220,53,69,.15); }
.dk-control:read-only { background: #f1f3f5; color: #4a5768; }
select.dk-control { appearance: none; }
.dk-actions { display: flex; gap: 12px; margin-top: 24px; }
.dk-btn-gray { flex: 1; border: 1px solid #dee2e6; background: #fff; color: #4a5768; font-weight: 600; border-radius: 8px; padding: 12px; cursor: pointer; text-decoration: none; text-align: center; display: inline-block; }
.dk-btn-gray:hover { background: #f1f3f5; text-decoration: none; }
.dk-btn-red { flex: 2; border: 0; background: #1b5fc1; color: #fff; font-weight: 600; border-radius: 8px; padding: 12px; cursor: pointer; }
.dk-btn-red:hover { background: #154e9e; }

/* Bank grid + payment */
.bank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bank-pick { border: 1.5px solid #dee2e6; border-radius: 8px; background: #fff; height: 56px; display: flex; align-items: center; justify-content: center; padding: 6px; cursor: pointer; }
.bank-pick img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bank-pick.active { border-color: #1b5fc1; background: #f0f5fd; }
.pay-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.pay-box { border: 1px solid #cfe3c0; border-radius: 10px; background: #fff; padding: 14px; margin-bottom: 14px; }
.pay-box-title { margin: 0 0 12px; font-size: 14px; }
.pay-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pay-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pay-item { border: 1px solid #e5e0d5; border-radius: 8px; background: #fff; height: 56px; display: flex; align-items: center; justify-content: center; padding: 6px; cursor: pointer; }
.pay-item img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pay-item.active { border: 2px solid #1b5fc1; background: #f0f5fd; }
.pay-row-label { margin: 12px 0 2px; font-size: 12.5px; color: #6c757d; }
.pay-row-text { margin: 0; font-size: 13.5px; }
.pay-total { margin: 2px 0 0; font-size: 22px; font-weight: 800; color: #a31621; }
.pay-submit { width: 100%; margin-top: 14px; border: 0; border-radius: 8px; background: #e8590c; color: #fff; font-size: 15px; font-weight: 700; padding: 13px; cursor: pointer; }
.pay-submit:hover { background: #d9480f; }
.qr-box { margin-top: 14px; border: 1px dashed #c6cfda; border-radius: 10px; background: #fafbfd; padding: 14px; text-align: center; }
.qr-box img.qr-img { width: 200px; height: 200px; object-fit: contain; background: #fff; border: 1px solid #eef1f6; border-radius: 8px; margin: 8px auto; display: block; }
.qr-wrap { position: relative; display: block; width: 200px; max-width: 100%; margin: 8px auto; }
.qr-wrap .qr-img { width: 100%; height: auto; margin: 0; }
.qr-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 28px; height: 28px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.dk-upload-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: #e8eefb; color: #1b5fc1; font-size: 22px; font-weight: 700; }
.qr-actions { display: flex; justify-content: center; margin-top: 10px; }
.hint { font-size: 12.5px; color: var(--muted); }
.review { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 14px; background: #fff; }
.review-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 11px 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
.review-row:last-child { border-bottom: 0; }
.review-row span { color: var(--muted); }

/* Upload */
.dk-upload { display: flex; align-items: center; gap: 12px; border: 1.5px dashed #c6cfda; border-radius: 8px; background: #fafbfd; padding: 16px 14px; font-size: 13.5px; color: #4a5768; cursor: pointer; }
.dk-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.dk-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid #dee2e6; }

/* Admin */
.admin-body { display: flex; min-height: 100vh; background: #f4f6f9; color: #1f2937; }
.admin-sidebar { width: 250px; min-width: 250px; min-height: 100vh; background: linear-gradient(180deg,#b91c1c 0%,#881318 100%); padding: 24px 16px; display: flex; flex-direction: column; align-items: center; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
.admin-profile { display: flex; flex-direction: column; align-items: center; margin: 26px 0 24px; }
.admin-avatar { width: 76px; height: 76px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; color: #b91c1c; }
.admin-name { margin-top: 10px; font-size: 18px; font-weight: 800; letter-spacing: 1.5px; color: #fff; }
.admin-nav { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.admin-nav a { display: flex; align-items: center; gap: 10px; background: #fff; color: #374151; padding: 12px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 600; border-left: 5px solid transparent; }
.admin-nav a.active { color: #b91c1c; border-left-color: #b91c1c; }
.admin-nav a:hover { text-decoration: none; }
.admin-nav-count { margin-left: auto; background: #b91c1c; color: #fff; font-size: 12px; border-radius: 20px; padding: 2px 9px; }
.admin-sidebar-footer { margin-top: auto; width: 100%; padding-top: 20px; }
.admin-logout-btn { display: block; text-align: center; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; padding: 10px; font-size: 13.5px; font-weight: 600; }
.admin-logout-btn:hover { background: rgba(255,255,255,.25); color: #fff; text-decoration: none; }
.admin-main { flex: 1; padding: 24px 32px; min-width: 0; }
.admin-page-title { font-size: 22px; font-weight: 700; margin: 0 0 24px; }
.admin-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 20px 24px; margin-bottom: 24px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.admin-card-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.admin-search-input { height: 38px; width: 100%; max-width: 320px; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 0 14px; font-size: 14px; margin-bottom: 14px; font-family: inherit; }
.admin-table { border-collapse: collapse; width: 100%; min-width: 620px; }
.admin-table th { padding: 12px 16px; background: rgba(0,0,0,.02); color: #6b7280; font-size: 13px; text-align: left; border-bottom: 1.5px solid #e5e7eb; }
.admin-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }
.badge-status { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-status.approved { background: #dcfce7; color: #15803d; }
.badge-status.pending { background: #fef9c3; color: #854d0e; }
.badge-status.rejected { background: #fee2e2; color: #b91c1c; }
.btn-xs { display: inline-block; border: 0; border-radius: 6px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; margin: 2px; font-family: inherit; }
.btn-ok { background: #16a34a; color: #fff; }
.btn-no { background: #f1f3f5; color: #8d1a14; }
.btn-del { background: transparent; color: #6c757d; }
.sys-input { height: 42px; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 0 14px; font-size: 14px; width: 100%; font-family: inherit; margin-bottom: 12px; }
.announcement-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #f9fafb; border: 1.5px solid #e5e7eb; border-radius: 12px; margin-bottom: 12px; }
.announcement-item.active { border-color: #b91c1c; background: #fff; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-box { background: #fff; border-radius: 18px; max-width: 540px; width: 100%; }
.modal-head { background: #2563eb; color: #fff; padding: 16px 20px; border-radius: 18px 18px 0 0; font-weight: 700; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.nav-toggle { display: none; border: 1px solid #e0d5bd; background: #fff; border-radius: 8px; width: 42px; height: 42px; font-size: 20px; cursor: pointer; color: #182940; align-items: center; justify-content: center; flex: none; }

@media (max-width: 900px) {
  .admin-body { flex-direction: column; }
  .admin-sidebar { width: 100%; min-width: 0; min-height: auto; }
  .admin-main { padding: 16px; }
  .row-g3 { grid-template-columns: 1fr; }
  .pay-layout { grid-template-columns: 1fr; }
  .pay-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .csgt-header .brand-org { font-size: 17px; }
  .csgt-header .brand-title { font-size: 19px; }
  .csgt-logo { width: 50px; height: 62px; }
  .nav-toggle { display: inline-flex; }
  .csgt-navbar-container { flex-wrap: wrap; }
  .csgt-navbar-left { display: none; width: 100%; flex-direction: column; align-items: stretch; order: 3; }
  .csgt-navbar.open .csgt-navbar-left { display: flex; }
  .csgt-navbar-left .csgt-quick-link { border-left: 0; border-top: 1px solid #e8ddc2; padding: 12px 6px; }
  .csgt-navbar-left .csgt-quick-link:first-child { border-top: 0; }
  #register-form { padding: 1.5rem 1.25rem; }
  .page-body { padding: 20px 12px 40px; }
}
