/* Trang Bảng giá — dùng chung /assets/site.css (màu, phông, thanh trên, chân trang). */
button { font: inherit; cursor: pointer; }
main.lift { padding-bottom: 20px; }
section { scroll-margin-top: 80px; }
.muted { color: var(--muted); font-size: 13.5px; }

/* Chọn tháng / năm (trong dải đầu trang tối) */
.period { display: inline-flex; padding: 5px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); margin-top: 24px; }
.period button { white-space: nowrap; border: 0; background: none; padding: 9px 18px; border-radius: 10px; font-weight: 700; color: #CFEFF1; }
.period button.on { background: #fff; color: var(--brand-d); box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.period .save { font-size: 11px; font-weight: 700; background: var(--lime); color: #3A2E00; padding: 2px 7px; border-radius: 999px; margin-left: 4px; }

/* Thẻ gói */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 980px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
/* Gói Free: hiện nổi bật đầu bảng, viền xanh lá nét đứt. */
.plan.free { border: 2px dashed #10B981; background: linear-gradient(180deg, #F3FBF7, #fff); }
.plan li.off { color: var(--muted); }
.plan li.off::before { background: #ECECEC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") center / 11px no-repeat; }
.plan a.primary { margin-top: auto; width: 100%; box-sizing: border-box; display: block; text-align: center; text-decoration: none; }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px 22px; box-shadow: var(--sh); transition: transform .2s, box-shadow .2s; }
.plan:hover { transform: translateY(-3px); box-shadow: var(--sh2); }
.plan.hot { border: 2px solid var(--brand); box-shadow: 0 2px 4px rgba(7,43,51,.05), 0 22px 48px rgba(7,167,179,.22); }
.plan .tag { position: absolute; top: -13px; left: 22px; background: linear-gradient(135deg, var(--brand), var(--glow)); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; box-shadow: 0 6px 14px rgba(7,167,179,.3); }
.plan h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.plan .for { color: var(--muted); font-size: 13.5px; min-height: 22px; }
.plan .price { margin: 16px 0 2px; font-weight: 800; font-size: 27px; line-height: 1.1; letter-spacing: -.8px; color: var(--ink); }
.plan .price small { font-weight: 600; font-size: 13px; letter-spacing: 0; color: var(--muted); }
.plan .per { color: var(--muted); font-size: 12.5px; min-height: 18px; }
.plan ul { list-style: none; padding: 16px 0 0; margin: 16px 0 20px; display: grid; gap: 9px; font-size: 14.5px; color: var(--ink2); border-top: 1px solid var(--line); }
.plan li { position: relative; padding-left: 27px; }
.plan li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #E2F6EC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E9F6E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.plan button { margin-top: auto; width: 100%; }
.note { color: var(--ink2); font-size: 14px; margin: 18px 0 0; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }

/* Nút */
.primary { border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #12C4C8, #079AA6); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 18px rgba(7,154,166,.28); transition: filter .15s, transform .15s; }
.primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.primary:disabled { opacity: .6; cursor: default; transform: none; }
.ghost { border: 1.5px solid #BFE6EA; border-radius: 12px; padding: 11px 18px; font-weight: 700; color: var(--brand-d); background: #fff; }
.ghost:hover { border-color: var(--brand); }

/* Khung đơn hàng / quản lý mã */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px 28px; margin-top: 28px; box-shadow: var(--sh); }
.card h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.3px; }
.order { border-top: 4px solid var(--brand); }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-head h2 { font-size: 28px; font-weight: 800; margin: 2px 0 0; }
.badge { font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #E3F7F9; color: var(--brand-d); white-space: nowrap; }
.badge.done { background: #DDF6EA; color: var(--ok); }
.badge.expired { background: #FDE7EB; color: var(--danger); }

.form label { display: block; font-weight: 600; font-size: 13.5px; margin: 14px 0 0; color: var(--ink); }
input, textarea { font: inherit; width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: #F7FBFC; color: var(--ink); margin-top: 6px; outline: none; transition: border-color .15s, background .15s; }
input:focus, textarea:focus { border-color: var(--brand); background: #fff; }
details { margin-top: 14px; font-size: 14px; }
summary { cursor: pointer; color: var(--brand-d); font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.row input { flex: 1; min-width: 200px; margin-top: 0; }
.msg { min-height: 18px; margin: 10px 0 0; font-size: 13.5px; color: var(--danger); font-weight: 600; }

.pay { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 18px; }
.pay img { width: 260px; height: 260px; max-width: 100%; border-radius: 16px; border: 1px solid var(--line); background: #fff; padding: 8px; box-shadow: var(--sh); }
.pay-info { flex: 1; min-width: 260px; }
.step { margin: 0 0 10px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 14.5px; padding: 14px 16px; background: #F7FBFC; border: 1px solid var(--line); border-radius: 14px; }
dt { color: var(--muted); }
dd { margin: 0; word-break: break-all; }
.code { font-family: Consolas, ui-monospace, monospace; letter-spacing: 1px; color: var(--brand-d); }
.copy { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 1px 9px; font-size: 12px; color: var(--brand-d); margin-left: 6px; }
.warn { font-size: 13.5px; background: #FFF8E1; border: 1px solid #F5DFA0; border-radius: 12px; padding: 10px 12px; color: #6B5200; }
.wait { color: var(--brand-d); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }

.done { text-align: left; margin-top: 12px; }
.ok-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #18C08A, var(--ok)); }
.done textarea { font-family: Consolas, ui-monospace, monospace; font-size: 14px; letter-spacing: .5px; resize: none; }
.how { font-size: 14.5px; padding-left: 20px; color: var(--ink2); }

table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
td .ghost { padding: 5px 12px; font-size: 13px; }
.kinfo { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.kinfo span { background: #E3F7F9; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--brand-d); }
.kinfo span.bad { background: #FDE7EB; color: var(--danger); }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 40; }
#toast.on { opacity: 1; }
@media (max-width: 560px) { .card { padding: 20px 18px; } .pay img { margin: 0 auto; } .period button { padding: 8px 12px; font-size: 14px; } .period .save { font-size: 10px; padding: 2px 5px; } }
#plans .msg { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; box-shadow: var(--sh); }

/* Hủy đơn / tải tệp mã / thông báo email */
.ghost.danger { border-color: #F2B8C2; color: #C81E3A; }
.ghost.danger:hover { border-color: #C81E3A; background: #FFF5F7; }
a.btn-dl { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.mailnote { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: #E9F8F1; border: 1px solid #BFE8D2; color: #0A7D4F; font-size: 14px; font-weight: 600; }
.badge.cancelled { background: #F1F3F4; color: #6A7B80; }
