/* SmartScheduler — Đăng ký mua bản quyền
   Bảng màu & nhịp thiết kế lấy cảm hứng từ giao diện Claude */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');

:root {
  --bg:            #FAF9F5;
  --surface:       #FFFFFF;
  --surface-2:     #F5F2EA;
  --surface-3:     #EFEBE0;
  --border:        #E7E2D6;
  --border-2:      #D8D2C4;
  --text:          #191817;
  --text-2:        #55514B;
  --muted:         #8A857D;
  --accent:        #C96442;
  --accent-2:      #B05233;
  --accent-soft:   #FAEFE9;
  --ok:            #2F6F4F;
  --ok-soft:       #EAF3ED;
  --warn:          #A66A00;
  --danger:        #B3402F;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(25,24,23,.05);
  --shadow:    0 1px 3px rgba(25,24,23,.06), 0 8px 24px -12px rgba(25,24,23,.12);
  --shadow-lg: 0 2px 6px rgba(25,24,23,.06), 0 24px 48px -20px rgba(25,24,23,.20);

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.012em; margin: 0; }
h1 { font-size: 40px; line-height: 1.12; }
h2 { font-size: 26px; line-height: 1.2; }
h3 { font-size: 19px; line-height: 1.3; }

@media (max-width: 640px) {
  h1 { font-size: 30px; }
  h2 { font-size: 22px; }
}

.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------- thanh trên */

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(250,249,245,.86);
  backdrop-filter: saturate(160%) blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.topbar-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 62px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand > div { min-width: 0; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: var(--accent);
  display: grid; place-items: center;
  color: #fff; font-family: var(--serif); font-size: 16px; font-weight: 600;
}
.brand-name { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: -3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar a.nav { color: var(--text-2); font-size: 14.5px; font-weight: 500; white-space: nowrap; flex: none; }
.topbar a.nav:hover { color: var(--accent); text-decoration: none; }

/* Ô tra cứu nhanh trên topbar — 1 ô, gõ gì cũng tra (SĐT/mã đơn/email/mã số đăng ký) */
.tb-right { display: flex; align-items: center; gap: 12px; flex: none; }
.tbsearch { position: relative; display: flex; align-items: center; }
.tbsearch svg { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.topbar .tbsearch input {
  height: 38px; width: 214px; padding: 0 14px 0 40px;
  font-size: 14px; color: var(--text);
  border: 1px solid var(--border-2); border-radius: 999px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s, width .18s;
}
.topbar .tbsearch input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); width: 236px;
}

/* Mobile: topbar gọn lại, chữ không tràn */
@media (max-width: 560px) {
  .topbar-in { height: 54px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 26px; height: 26px; font-size: 9px; }
  .brand-name { font-size: 15px; }
  .brand-sub { display: none; }
  .topbar a.nav { font-size: 13px; }
  .tb-right { gap: 8px; }
  .topbar .tbsearch input { width: 132px; height: 34px; font-size: 13px; padding-left: 36px; }
  .topbar .tbsearch input:focus { width: 144px; }
}

/* ------------------------------------------------------------------- hero */

.hero { padding: 52px 0 34px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid #F0DDD3; padding: 5px 11px; border-radius: 999px;
  margin-bottom: 18px;
}
.hero p.lead { font-size: 17.5px; color: var(--text-2); margin: 16px 0 0; max-width: 60ch; }

.links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 9px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  box-shadow: var(--shadow-sm);
  transition: .15s;
}
.chip:hover {
  border-color: var(--accent); color: var(--accent);
  text-decoration: none; transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.chip svg { flex: none; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 34px 0 8px;
}
@media (max-width: 700px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.fact {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 15px 16px;
}
.fact b { display: block; font-family: var(--serif); font-size: 23px; font-weight: 600; }
.fact span { font-size: 13px; color: var(--muted); line-height: 1.45; display: block; margin-top: 2px; }

/* ------------------------------------------------------------------- card */

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow);
  padding: 30px; margin: 30px 0 60px;
}
@media (max-width: 640px) { .card { padding: 20px; border-radius: var(--r-lg); } }

.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 26px; }
.step { display: flex; align-items: center; gap: 9px; flex: none; }
.step .dot {
  width: 25px; height: 25px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
  background: var(--surface-3); color: var(--muted);
  border: 1px solid var(--border-2);
  transition: .2s;
}
.step .lb { font-size: 13.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.step.on .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.on .lb { color: var(--text); }
.step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-line { height: 1px; background: var(--border-2); flex: 1; min-width: 10px; }
@media (max-width: 700px) { .step .lb { display: none; } }

.sec-title { margin-bottom: 4px; }
.sec-desc { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }

/* ------------------------------------------------------------------- form */

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
label.lb2 { font-size: 14px; font-weight: 600; color: var(--text); }
label.lb2 .req { color: var(--accent); }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

input[type=text], input[type=email], input[type=tel], input[type=number], textarea, select {
  width: 100%;
  font-family: inherit; font-size: 15.5px; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-2); border-radius: var(--r);
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
/* Mọi ô nhập một dòng cao đều nhau → hàng thẳng, dễ chạm trên mobile */
input[type=text], input[type=email], input[type=tel], input[type=number], select { height: 48px; }
textarea { min-height: 108px; resize: vertical; line-height: 1.55; }

/* select: mũi tên tùy biến gọn gàng thay cho mũi tên mặc định của trình duyệt */
select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A857D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

/* Bỏ nút tăng/giảm của ô số cho gọn (vẫn gõ số bình thường) */
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

input:hover:not(:focus), textarea:hover:not(:focus), select:hover:not(:focus) { border-color: var(--muted); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(201,100,66,.14);
}
input.err, textarea.err { border-color: var(--danger); box-shadow: 0 0 0 3.5px rgba(179,64,47,.12); }
input::placeholder, textarea::placeholder { color: #B5AFA6; }

.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .opts.two { grid-template-columns: 1fr; } }

.opt {
  display: flex; gap: 11px; align-items: flex-start;
  border: 1px solid var(--border-2); border-radius: var(--r);
  padding: 13px 14px; cursor: pointer; background: var(--surface);
  transition: .14s;
}
.opt:hover { border-color: var(--border-2); background: var(--surface-2); }
.opt input { margin: 3px 0 0; accent-color: var(--accent); flex: none; width: 16px; height: 16px; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt .t { font-size: 14.5px; font-weight: 600; display: block; }
.opt .d { font-size: 12.5px; color: var(--muted); display: block; line-height: 1.45; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  border: 1px solid var(--border-2); background: var(--surface);
  border-radius: 999px; padding: 7px 14px;
  font-size: 13.5px; font-family: inherit; color: var(--text-2);
  cursor: pointer; transition: .14s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag.sel { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ------------------------------------------------------------------- tiền */

.money {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 22px; margin-top: 8px;
}
.money .row { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; padding: 5px 0; color: var(--text-2); }
.money .row.total {
  border-top: 1px solid var(--border-2); margin-top: 10px; padding-top: 14px;
  font-size: 15px; color: var(--text); align-items: baseline;
}
.money .row.total b { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--accent); }
.money .note { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* --------------------------------------------------------------- nút bấm */

.actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 28px; }
.btn {
  font-family: inherit; font-size: 15px; font-weight: 600;
  border-radius: var(--r); padding: 12px 22px; cursor: pointer;
  border: 1px solid transparent; transition: .15s;
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn-main { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-main:hover { background: var(--accent-2); }
.btn-main:disabled { background: #D8CFC7; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-block { width: 100%; }

.alert {
  border-radius: var(--r); padding: 12px 15px; font-size: 14px;
  background: #FCEEEB; border: 1px solid #F0CFC7; color: var(--danger);
  margin-top: 16px;
}
.alert.ok { background: var(--ok-soft); border-color: #CBE2D5; color: var(--ok); }

/* ------------------------------------------------------------- hoàn thành */

.done { text-align: center; padding: 12px 0 4px; }
.done .tick {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 20px;
  background: var(--ok-soft); border: 1px solid #CBE2D5;
  display: grid; place-items: center;
}
.code {
  display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 21px; font-weight: 600; letter-spacing: .06em;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r); padding: 9px 18px; margin: 6px 0 4px;
}
.summary { text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; margin-top: 24px; }
.summary .r { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: 14.5px; }
.summary .r span { color: var(--muted); flex: none; }
.summary .r b { font-weight: 600; text-align: right; }

.zalo-box {
  margin-top: 24px; display: flex; gap: 20px; align-items: center;
  background: #F0F7FE; border: 1px solid #D3E6F8; border-radius: var(--r-lg);
  padding: 20px; text-align: left;
}
.zalo-box img { width: 132px; height: 132px; border-radius: var(--r); background: #fff; padding: 7px; border: 1px solid #D3E6F8; flex: none; }
.zalo-box h3 { font-size: 17px; margin-bottom: 4px; }
.zalo-box p { font-size: 13.5px; color: var(--text-2); margin: 0 0 12px; line-height: 1.5; }
.btn-zalo { background: #0068FF; color: #fff; }
.btn-zalo:hover { background: #0057D6; color: #fff; text-decoration: none; }
@media (max-width: 600px) { .zalo-box { flex-direction: column; text-align: center; } .zalo-box p { text-align: center; } }

/* ----------------------------------------------------------------- bảng */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.moi   { background: var(--accent-soft); color: var(--accent-2); }
.pill.lienhe{ background: #FDF3DF; color: var(--warn); }
.pill.chot  { background: var(--ok-soft); color: var(--ok); }
.pill.huy   { background: #F1EFEC; color: var(--muted); }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); font-size: 14.5px; }

footer {
  border-top: 1px solid var(--border); margin-top: 20px;
  padding: 26px 0 42px; font-size: 13.5px; color: var(--muted);
}
footer b { color: var(--text-2); }

.hidden { display: none !important; }
