/* 10/11/2026 · Giao diện trang đặt lịch.
   Màu và cỡ chữ lấy từ bản chụp trang thật (Craft Anything, clean room):
   chữ #0a2540 · chữ phụ #476788 · nhấn #004eba · nền ngày rảnh #f4f8ff
   bo 8px · chữ thường 14px · h1 28px · h2 22px */

:root {
  --chu: #0a2540;
  --chu-phu: #476788;
  --chu-mo: #5f6d77;
  --nhan: #004eba;
  --nhan-nhat: #f4f8ff;
  --vien: #d4e0f0;
  --nen: #fafafa;
  --the: #ffffff;
  --bo: 8px;
  --font: "Proxima Nova", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Phải có dòng này: bên dưới có nhiều chỗ đặt display cho chính các khối lúc đầu đang ẩn
   (li trong .thuoc-tinh, .cot-xong…), mà display trong lớp thì thắng display:none mặc định
   của [hidden] — không chặn ở đây thì màn "đã đặt xong" lòi ra ngay khi khách mới vào. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--nen);
  color: var(--chu);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--nhan); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.boc {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 12px;
}

.the {
  width: 100%;
  max-width: 780px;
  background: var(--the);
  border: 1px solid var(--vien);
  border-radius: var(--bo);
  box-shadow: 0 1px 2px rgba(10, 37, 64, .06);
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 560px;
}
.the.co-gio { grid-template-columns: 300px 1fr 240px; max-width: 1020px; }
.the.dang-dien { grid-template-columns: 340px 1fr; max-width: 780px; }
.the-hep { max-width: 560px; grid-template-columns: 1fr; min-height: 0; }

/* ── cột thông tin buổi ── */
.cot-tin {
  padding: 30px;
  border-right: 1px solid var(--vien);
  position: relative;
}
/* Ở bước điền thông tin mới có nút quay lại, nên chừa chỗ cho nó, khỏi đè lên tên chủ lịch. */
.the.dang-dien .cot-tin { padding-top: 60px; }
.quay-lai {
  position: absolute; top: 20px; left: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: transparent; color: var(--nhan);
  font-size: 20px; cursor: pointer;
}
.quay-lai:hover { background: var(--nhan-nhat); }
.chu-lich { margin: 0 0 4px; color: var(--chu-phu); font-weight: 700; font-size: 14px; }
.ten-buoi { margin: 0 0 16px; font-size: 28px; line-height: 1.2; letter-spacing: -.2px; }
.thuoc-tinh { list-style: none; margin: 0 0 16px; padding: 0; color: var(--chu-phu); font-weight: 700; }
.thuoc-tinh li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; word-break: break-word; }
.bieu-tuong { flex: 0 0 auto; filter: grayscale(1); opacity: .8; }
.mo-ta { color: var(--chu-phu); margin: 16px 0 0; }

/* ── cột lịch ── */
.cot-lich, .cot-gio, .cot-form, .cot-xong { padding: 30px; }
.cot-gio { border-left: 1px solid var(--vien); max-height: 620px; overflow-y: auto; }
h2 { font-size: 22px; margin: 0 0 24px; }
h3 { font-size: 15px; margin: 0 0 12px; color: var(--chu); }

.lich-dau { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; }
.lich-dau strong { font-size: 16px; min-width: 150px; text-align: center; }
.nut-thang {
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--nhan); font-size: 20px; cursor: pointer;
}
.nut-thang:hover:not(:disabled) { background: var(--nhan-nhat); }
.nut-thang:disabled { color: #c3ccd8; cursor: default; }

.lich-thu, .lich-o { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.lich-thu { color: var(--chu-phu); font-size: 12px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.lich-o button {
  aspect-ratio: 1; width: 100%; border: 0; border-radius: 50%;
  background: transparent; color: #c3ccd8; font: 600 14px/1 var(--font); cursor: default;
}
.lich-o button.ranh {
  background: var(--nhan-nhat); color: var(--nhan); font-weight: 700; cursor: pointer;
}
.lich-o button.ranh:hover { background: #e3edff; }
.lich-o button.dang-chon { background: var(--nhan); color: #fff; }
.lich-o button.hom-nay::after {
  content: ""; display: block; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; margin: 2px auto 0;
}
.dang-tai { color: var(--chu-phu); text-align: center; margin: 12px 0 0; }

.mui-gio { margin-top: 24px; color: var(--chu-phu); }
.mui-gio label { display: block; font-weight: 700; margin-bottom: 6px; }
.mui-gio select, .o select {
  width: 100%; max-width: 280px; padding: 8px 10px;
  border: 1px solid var(--vien); border-radius: 6px;
  font: 14px var(--font); color: var(--chu); background: #fff;
}

/* ── danh sách giờ ── */
.danh-sach-gio { display: flex; flex-direction: column; gap: 8px; }
.gio-hang { display: flex; gap: 8px; }
.gio-hang > button { flex: 1; }
.nut-gio {
  padding: 12px; border: 1px solid var(--nhan); border-radius: 6px;
  background: #fff; color: var(--nhan); font: 700 14px var(--font); cursor: pointer;
}
.nut-gio:hover { background: var(--nhan-nhat); }
.nut-gio.xac-nhan { background: var(--nhan); color: #fff; }
.nut-gio.da-chon { background: #475569; border-color: #475569; color: #fff; }
.khong-co { color: var(--chu-phu); }

/* ── biểu mẫu ── */
.o { display: block; margin-bottom: 16px; }
.o > span { display: block; font-weight: 700; margin-bottom: 6px; }
.o i { color: #b42318; font-style: normal; }
.o input, .o textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid #9aa9bb; border-radius: 6px;
  font: 14px var(--font); color: var(--chu); background: #fff;
}
.o input:focus, .o textarea:focus, .o select:focus, .mui-gio select:focus {
  outline: 2px solid var(--nhan); outline-offset: 0; border-color: var(--nhan);
}
.o .goi-y { font-weight: 400; color: var(--chu-mo); font-size: 12px; }
.them-khach {
  border: 1px solid var(--nhan); background: #fff; color: var(--nhan);
  border-radius: 9999px; padding: 6px 14px; font: 700 13px var(--font); cursor: pointer; margin-bottom: 16px;
}
.nut-chinh, .nut-phu {
  border: 0; border-radius: 9999px; padding: 12px 24px;
  font: 700 15px var(--font); cursor: pointer;
}
.nut-chinh { background: var(--nhan); color: #fff; }
.nut-chinh:hover { background: #003e95; }
.nut-chinh:disabled { background: #9aa9bb; cursor: default; }
.nut-phu { background: #fff; color: #b42318; border: 1px solid #b42318; }
.nut-phu:hover { background: #fff5f4; }
.loi { color: #b42318; font-weight: 700; margin: 0 0 12px; }

/* ── màn xong ── */
.cot-xong { text-align: center; display: flex; flex-direction: column; justify-content: center; }
.the-hep .cot-xong { text-align: left; align-items: flex-start; }
/* .cot-xong là flex column nên con bị kéo giãn hết bề ngang — nút phải co lại đúng cỡ chữ. */
.the-hep .cot-xong > button { align-self: flex-start; }
.the-hep .cot-xong > .o { width: 100%; }
.dau-tich {
  width: 48px; height: 48px; border-radius: 50%; background: #e7f6ec; color: #1a7f45;
  font-size: 24px; line-height: 48px; margin: 0 auto 16px;
}
.xong-phu { color: var(--chu-phu); }
.bang-trang-thai {
  background: var(--nhan-nhat); border-radius: 6px; padding: 12px; color: var(--chu-phu); font-weight: 700;
}
.bang-trang-thai.huy { background: #fff5f4; color: #b42318; }
.ds-loai { list-style: none; padding: 0; margin: 16px 0 0; }
.ds-loai a {
  display: block; padding: 16px; border: 1px solid var(--vien); border-radius: var(--bo);
  margin-bottom: 12px; text-decoration: none; color: var(--chu);
}
.ds-loai a:hover { border-color: var(--nhan); background: var(--nhan-nhat); }
.ds-loai strong { display: block; font-size: 16px; }
.ds-loai span { color: var(--chu-phu); font-weight: 700; }
.ds-loai em { display: block; margin-top: 6px; color: var(--chu-phu); font-style: normal; }
.cuoi-trang { color: #9aa9bb; font-weight: 700; font-size: 12px; margin: 0; }

/* ── điện thoại ── */
@media (max-width: 880px) {
  .boc { padding: 0; justify-content: flex-start; }
  .the, .the.co-gio, .the.dang-dien {
    grid-template-columns: 1fr; max-width: 100%;
    border: 0; border-radius: 0; min-height: 100vh; box-shadow: none;
  }
  .cot-tin { border-right: 0; border-bottom: 1px solid var(--vien); padding: 24px 16px; }
  .cot-lich, .cot-gio, .cot-form, .cot-xong { padding: 24px 16px; }
  .cot-gio { border-left: 0; border-top: 1px solid var(--vien); max-height: none; }
  .ten-buoi { font-size: 26px; }
  .cuoi-trang { padding-bottom: 16px; }
}

/* ── trang quản trị ── */
.qt { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
.qt-dau { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.qt-dau h1 { font-size: 22px; margin: 0; }
.qt-dau nav { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--vien); background: #fff; color: var(--chu-phu);
  border-radius: 9999px; padding: 8px 16px; font: 700 13px var(--font);
  cursor: pointer; text-decoration: none;
}
.tab.dang-chon { background: var(--nhan); border-color: var(--nhan); color: #fff; }
.the-nho {
  background: #fff; border: 1px solid var(--vien); border-radius: var(--bo);
  padding: 16px; margin-bottom: 12px;
}
.the-nho h3 { margin: 0 0 8px; }
.hang-trang-thai { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--chu-phu); font-weight: 700; }
.vien-xanh { color: #1a7f45; }
.vien-do { color: #b42318; }
.vien-vang { color: #946200; }
table.bang { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
table.bang th, table.bang td { text-align: left; padding: 10px; border-bottom: 1px solid var(--vien); vertical-align: top; }
table.bang th { color: var(--chu-phu); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.the-nho .o { margin-bottom: 12px; }
.luoi-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.hang-khung { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.hang-khung select, .hang-khung input { padding: 6px 8px; border: 1px solid var(--vien); border-radius: 6px; font: 14px var(--font); }
.nut-nho {
  border: 1px solid var(--vien); background: #fff; color: var(--chu-phu);
  border-radius: 6px; padding: 6px 10px; font: 700 12px var(--font); cursor: pointer;
}
.nut-nho:hover { border-color: var(--nhan); color: var(--nhan); }
