/* Aura Quick MC Order – frontend */
.aqo-wrap, .aqo-pay-card {
	--aqo-primary: #4f46e5;
	--aqo-primary-dark: #4338ca;
	--aqo-border: #d9dde3;
	--aqo-bg: #f7f8fa;
	--aqo-text: #1f2937;
	--aqo-muted: #6b7280;
	--aqo-radius: 10px;
	color: var(--aqo-text);
	box-sizing: border-box;
}
.aqo-wrap *, .aqo-pay-card * { box-sizing: border-box; }
.aqo-wrap { max-width: 760px; margin: 0 auto 2rem; }
.aqo-status { max-width: 1000px; }

/* Form */
.aqo-form { background: #fff; border: 1px solid var(--aqo-border); border-radius: var(--aqo-radius); padding: 24px; }
.aqo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.aqo-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.aqo-field--full { grid-column: 1 / -1; }
.aqo-field label { font-weight: 600; font-size: 14px; }
.aqo-req { color: #dc2626; }
.aqo-field input, .aqo-field select, .aqo-input {
	width: 100%; padding: 10px 12px; font-size: 15px; line-height: 1.4; color: var(--aqo-text);
	border: 1px solid var(--aqo-border); border-radius: 8px; background: #fff; min-height: 42px;
}
.aqo-field input:focus, .aqo-field select:focus, .aqo-input:focus {
	outline: none; border-color: var(--aqo-primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.aqo-field .aqo-invalid { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.aqo-hint { color: var(--aqo-muted); font-size: 12px; min-height: 16px; }
.aqo-preview { margin-top: 16px; padding: 10px 14px; background: #eef2ff; border-radius: 8px; font-size: 14px; color: #3730a3; }

/* Buttons */
.aqo-btn {
	display: inline-block; cursor: pointer; border: 0; border-radius: 8px; padding: 11px 22px;
	font-size: 15px; font-weight: 600; line-height: 1.2; transition: background .15s;
}
.aqo-btn--primary { margin-top: 20px; background: var(--aqo-primary); color: #fff; width: 100%; }
.aqo-btn--primary:hover { background: var(--aqo-primary-dark); }
.aqo-btn[disabled] { opacity: .6; cursor: wait; }
.aqo-btn--copy { background: #111827; color: #fff; padding: 8px 16px; font-size: 13px; }
.aqo-btn--copy:hover { background: #374151; }
.aqo-btn--copy.is-done { background: #16a34a; }

/* Notices */
.aqo-notice { padding: 12px 16px; border-radius: 8px; margin: 16px 0 0; font-size: 14px; line-height: 1.5; border: 1px solid transparent; }
.aqo-notice--info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.aqo-notice--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.aqo-notice--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.aqo-notice ul { margin: 6px 0 0 18px; padding: 0; }
.aqo-small { font-size: 13px; opacity: .85; margin-top: 4px; }
.aqo-notice[hidden], .aqo-preview[hidden], .aqo-result[hidden], .aqo-empty[hidden] { display: none; }

/* Result boxes */
.aqo-result { margin-top: 24px; }
.aqo-box { margin-top: 16px; border: 1px solid var(--aqo-border); border-radius: var(--aqo-radius); background: #fff; overflow: hidden; }
.aqo-box__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--aqo-bg); border-bottom: 1px solid var(--aqo-border); }
.aqo-box textarea {
	display: block; width: 100%; border: 0; padding: 14px; resize: vertical; font-size: 14px; line-height: 1.6;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #fff; color: var(--aqo-text);
}
.aqo-box textarea:focus { outline: none; background: #fcfcff; }

/* Status table */
.aqo-status__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.aqo-status__bar .aqo-input { max-width: 340px; }
.aqo-status__updated { font-size: 12px; color: var(--aqo-muted); }
.aqo-status__updated.is-error { color: #dc2626; }
.aqo-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--aqo-border); border-radius: var(--aqo-radius); }
.aqo-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.aqo-table th, .aqo-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.aqo-table th { background: var(--aqo-bg); font-weight: 600; white-space: nowrap; }
.aqo-table tr:last-child td { border-bottom: 0; }
.aqo-table tr[hidden] { display: none; }
.aqo-empty { text-align: center; color: var(--aqo-muted); padding: 20px 0; }
.aqo-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #f3f4f6; color: #374151; }
.aqo-badge--unpaid { background: #fef3c7; color: #92400e; }
.aqo-badge--deposited { background: #dbeafe; color: #1e40af; }
.aqo-badge--finished { background: #dcfce7; color: #166534; }

/* Trang thanh toán (order-pay) */
.aqo-pay-card { max-width: 640px; margin: 0 auto 24px; padding: 22px; background: #fff; border: 1px solid var(--aqo-border); border-radius: var(--aqo-radius); }
.aqo-pay-card__stage { display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 13px; font-weight: 600; }
.aqo-pay-card__title { margin: 0 0 12px; font-size: 20px; line-height: 1.3; }
.aqo-pay-card__title--pay { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--aqo-border); }
.aqo-pay-card__list { margin: 0; }
.aqo-pay-card__row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f1f4; }
.aqo-pay-card__row dt { flex: 0 0 170px; color: var(--aqo-muted); font-size: 14px; margin: 0; }
.aqo-pay-card__row dd { flex: 1; margin: 0; font-weight: 600; word-break: break-word; }
.aqo-pay-card__note { margin: 14px 0 0; font-size: 14px; color: var(--aqo-muted); }
.aqo-pay-page .woocommerce { max-width: 700px; margin-left: auto; margin-right: auto; }
.aqo-pay-blocked #place_order { display: none !important; }

@media (max-width: 640px) {
	.aqo-form { padding: 16px; }
	.aqo-grid { grid-template-columns: 1fr; }
	.aqo-field--spacer { display: none; }
	.aqo-pay-card__row { flex-direction: column; gap: 2px; }
	.aqo-pay-card__row dt { flex: none; }
	.aqo-table thead { display: none; }
	.aqo-table, .aqo-table tbody, .aqo-table tr, .aqo-table td { display: block; width: 100%; }
	.aqo-table tr { padding: 10px 0; border-bottom: 1px solid var(--aqo-border); }
	.aqo-table td { border: 0; padding: 4px 14px; }
	.aqo-table td[data-label]::before { content: attr(data-label) ": "; color: var(--aqo-muted); font-size: 12px; }
}

.aqo-field textarea { width: 100%; padding: 10px 12px; font-size: 15px; line-height: 1.5; color: var(--aqo-text); border: 1px solid var(--aqo-border); border-radius: 8px; background: #fff; resize: vertical; font-family: inherit; }
.aqo-field textarea:focus { outline: none; border-color: var(--aqo-primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.aqo-pay-card__row dd { white-space: pre-line; }

/* Bảng sự kiện mở rộng + phân trang */
.aqo-status { max-width: 1180px; }
.aqo-select { max-width: 220px; }
.aqo-loading { text-align: center; color: var(--aqo-muted); padding: 24px !important; }
.aqo-table--events .aqo-row { cursor: pointer; transition: background .12s; }
.aqo-table--events .aqo-row:hover { background: #f8f9ff; }
.aqo-table--events .aqo-row.is-open { background: #eef2ff; }
.aqo-table--events .aqo-row__act { text-align: right; white-space: nowrap; }
.aqo-toggle { background: none; border: 0; color: var(--aqo-primary); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 8px; }
.aqo-badge--paid { background: #dcfce7; color: #166534; }
.aqo-detail-row[hidden] { display: none; }
.aqo-detail-row > td { background: #f9fafc; padding: 18px 20px !important; cursor: default; }
.aqo-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.aqo-detail h4 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; color: var(--aqo-muted); }
.aqo-kvlist { background: #fff; border: 1px solid var(--aqo-border); border-radius: 10px; overflow: hidden; }
.aqo-kv { display: flex; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f0f1f4; font-size: 14px; }
.aqo-kv:last-child { border-bottom: 0; }
.aqo-kv__k { flex: 0 0 150px; color: var(--aqo-muted); }
.aqo-kv__v { flex: 1; font-weight: 600; word-break: break-word; white-space: pre-line; }
.aqo-paycard { background: #fff; border: 1px solid var(--aqo-border); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.aqo-paycard__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 14px; }
.aqo-paycard__amount { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.aqo-paycard__amount small { font-size: 12px; font-weight: 400; color: var(--aqo-muted); }
.aqo-paycard__link { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.aqo-paycard__link .aqo-input { flex: 1 1 200px; min-width: 0; font-size: 12px; padding: 7px 10px; min-height: 36px; }
.aqo-paycard__link .aqo-btn { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.aqo-btn--ghost { background: #fff; color: var(--aqo-text); border: 1px solid var(--aqo-border); text-decoration: none; }
.aqo-detail__boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.aqo-detail__boxes .aqo-box { margin-top: 0; }
.aqo-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.aqo-pager__info { font-size: 13px; color: var(--aqo-muted); }
.aqo-pager__nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.aqo-pager__btn { min-width: 36px; padding: 7px 10px; border: 1px solid var(--aqo-border); border-radius: 8px; background: #fff; color: var(--aqo-text); font-size: 13px; cursor: pointer; }
.aqo-pager__btn:hover:not([disabled]):not(.is-active) { border-color: var(--aqo-primary); color: var(--aqo-primary); }
.aqo-pager__btn.is-active { background: var(--aqo-primary); border-color: var(--aqo-primary); color: #fff; cursor: default; }
.aqo-pager__btn[disabled] { opacity: .45; cursor: not-allowed; }
.aqo-pager__gap { padding: 0 4px; color: var(--aqo-muted); }
@media (max-width: 860px) {
	.aqo-detail, .aqo-detail__boxes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.aqo-kv { flex-direction: column; gap: 0; }
	.aqo-kv__k { flex: none; }
	.aqo-table--events .aqo-row__act { text-align: left; }
	.aqo-detail-row > td { padding: 12px !important; }
}

/* Honeypot (ẩn với người thật) + mã truy cập */
.aqo-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.aqo-unlock { max-width: 420px; }
.aqo-status .aqo-notice[data-aqo-error] { margin: 0 0 12px; }

/* Danh sách: link tới trang sự kiện */
.aqo-link { color: var(--aqo-primary); text-decoration: none; }
.aqo-link:hover { text-decoration: underline; }
.aqo-table--events td:nth-child(2) .aqo-link { font-weight: 600; }

/* Trang riêng của sự kiện */
.aqo-detail-page { max-width: 860px; }
.aqo-back { display: inline-block; margin-bottom: 12px; color: var(--aqo-muted); text-decoration: none; font-size: 14px; }
.aqo-back:hover { color: var(--aqo-primary); }
.aqo-card { background: #fff; border: 1px solid var(--aqo-border); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.aqo-card h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--aqo-muted); }
.aqo-hero h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.25; color: #111827; }
.aqo-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aqo-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 13px; font-weight: 700; }
.aqo-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aqo-paybox { border: 1px solid var(--aqo-border); border-radius: 10px; padding: 14px; background: #fafbfc; }
.aqo-paybox__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.aqo-paybox__title { font-weight: 600; }
.aqo-paybox__amount { font-size: 22px; font-weight: 800; margin-bottom: 10px; color: #111827; }
.aqo-paybox__amount small { font-size: 12px; font-weight: 400; color: var(--aqo-muted); }
.aqo-paybox .aqo-input { font-size: 12px; padding: 8px 10px; min-height: 36px; margin-bottom: 8px; }
.aqo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.aqo-actions .aqo-btn, .aqo-copybox .aqo-btn { padding: 8px 14px; font-size: 13px; text-decoration: none; }
.aqo-copybox { border: 1px solid var(--aqo-border); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.aqo-copybox:last-child { margin-bottom: 0; }
.aqo-copybox__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: var(--aqo-bg); border-bottom: 1px solid var(--aqo-border); font-size: 14px; }
.aqo-copybox textarea { display: block; width: 100%; border: 0; padding: 12px; resize: vertical; font-size: 14px; line-height: 1.6; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #fff; color: var(--aqo-text); }
.aqo-copybox textarea:focus { outline: none; background: #fcfcff; }
.aqo-dl { margin: 0; }
.aqo-dl__row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f0f1f4; }
.aqo-dl__row:last-child { border-bottom: 0; }
.aqo-dl dt { flex: 0 0 190px; margin: 0; color: var(--aqo-muted); font-size: 14px; }
.aqo-dl dd { flex: 1; margin: 0; font-weight: 600; word-break: break-word; white-space: pre-line; }
.aqo-detail-page .aqo-badge--paid { background: #dcfce7; color: #166534; }
@media (max-width: 640px) {
	.aqo-grid2 { grid-template-columns: 1fr; }
	.aqo-card { padding: 14px; }
	.aqo-hero h2 { font-size: 20px; }
	.aqo-dl__row { flex-direction: column; gap: 2px; }
	.aqo-dl dt { flex: none; }
}

/* ===== Giao diện PC ===== */
.aqo-detail-page { max-width: 1120px; }
.aqo-hero { background: linear-gradient(135deg, #4f46e5, #6d5df0); border: 0; color: #fff; padding: 26px 28px; box-shadow: 0 6px 20px rgba(79, 70, 229, .22); }
.aqo-hero h2 { color: #fff; font-size: 28px; }
.aqo-hero .aqo-chip { background: rgba(255, 255, 255, .18); color: #fff; }
.aqo-hero .aqo-status__updated { color: rgba(255, 255, 255, .75); margin-left: auto; }
.aqo-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.aqo-layout__side { position: sticky; top: 16px; }
.aqo-card { box-shadow: 0 1px 3px rgba(16, 24, 40, .05); }
.aqo-card h3 { padding-bottom: 10px; border-bottom: 1px solid #f0f1f4; }
.aqo-paybox__amount { font-size: 24px; color: var(--aqo-primary); }
.aqo-paybox { background: #f8f9ff; border-color: #e3e6fb; }
.aqo-dl dt { flex-basis: 140px; }
.aqo-status { max-width: 1120px; }
.aqo-status__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.aqo-status__bar .aqo-input { width: auto; flex: 0 0 auto; }
.aqo-status__bar [data-aqo-search] { flex: 1 1 280px; }
.aqo-table--events thead th { background: #f3f4f8; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--aqo-muted); }
.aqo-table--events tbody tr { transition: background .12s; }
.aqo-table--events tbody tr:hover { background: #f8f9ff; }
.aqo-table--events td, .aqo-table--events th { padding: 13px 14px; }
@media (max-width: 900px) {
	.aqo-layout { grid-template-columns: 1fr; }
	.aqo-layout__side { position: static; }
	.aqo-hero { padding: 18px; }
	.aqo-hero h2 { font-size: 21px; }
}
