.small { font-size: 14px; }
.center { text-align: center; }

/* Biểu tượng vẽ nét, lấy màu theo chữ */
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.inline { width: 18px; height: 18px; vertical-align: -3px; margin-right: 8px; }
.icon.heart { color: var(--blue); fill: var(--blue); }

/* Dòng chữ kiểu viết tay ở góc ảnh nền */
.script { font-family: 'Segoe Script', 'Brush Script MT', 'Snell Roundhand', cursive; font-style: italic; color: var(--navy); font-size: 19px; }
.hero { position: relative; }
.hero .wrap { padding-top: 44px; padding-bottom: 48px; }
.hero .hello { font-size: 20px; font-weight: 700; color: var(--navy); }
.hero .script { position: absolute; right: max(16px, calc((100% - 1120px) / 2 + 16px)); top: 34px; max-width: 260px; text-align: right; margin: 0; }
@media (max-width: 860px) { .hero .script { position: static; text-align: left; margin-top: 12px; } }

.lookup-card { max-width: 520px; margin: -28px auto 0; display: grid; gap: 14px; position: relative; }
.lookup-card label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.lookup-card input {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.lookup-card input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

/* ===================== Hồ sơ thành viên ===================== */
.swoosh { display: block; width: 130px; height: 14px; margin: 2px 0 0 auto; fill: none; stroke: #d9a441; stroke-width: 2.4; stroke-linecap: round; }
.icon.solid { fill: currentColor; stroke: none; }

/* Ảnh đầu trang */
.profile-hero { position: relative; background: #cfe4f7 url('images/hero-member.jpg') right 58% / cover no-repeat; }
.profile-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(238, 246, 253, 0.9) 0%, rgba(238, 246, 253, 0.62) 36%, rgba(238, 246, 253, 0) 62%); }
.profile-hero .wrap { position: relative; min-height: 264px; padding-top: 56px; padding-bottom: 54px; }
.profile-hero h1 { font-size: clamp(30px, 4.3vw, 46px); font-weight: 700; letter-spacing: 0.01em; }
.profile-hero .hello { margin: 16px 0 0; font-size: 22px; font-weight: 700; color: var(--navy); }
.profile-hero .thanks { margin: 8px 0 0; max-width: 370px; font-size: 16.5px; color: #2b4566; }
.profile-hero .script { position: absolute; left: 51%; top: 38px; margin: 0; font-size: 24px; line-height: 1.35; transform: rotate(-7deg); white-space: nowrap; }

#profile > .wrap { display: grid; gap: 18px; padding-top: 18px; }
#profile .card { border-radius: 16px; border-color: #e6eef7; padding: 20px 28px 20px; }
.grid.two { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }

/* Tiêu đề khối có huy hiệu tròn */
.head { display: flex; align-items: center; gap: 18px; font-weight: 700; letter-spacing: 0.01em; }
#profile .card h2.head { font-size: clamp(20px, 2.3vw, 25px); }
.badge { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #d6e7fa; color: var(--navy); flex: none; }
.badge .icon { width: 32px; height: 32px; }
.badge.gold { background: radial-gradient(circle at 35% 30%, #fff3cf, #f7dc97); color: #8a5a06; }
.badge.blue { width: 76px; height: 76px; background: linear-gradient(145deg, #2a78d6, #0d4aa3); color: #fff; box-shadow: 0 6px 16px rgba(13, 74, 163, 0.28); }
.badge.blue .icon { width: 40px; height: 40px; stroke-width: 1.5; }

/* Các dòng nhãn - giá trị */
dl { margin: 12px 0 0; }
dl div { display: grid; grid-template-columns: 26px minmax(96px, 164px) minmax(0, 1fr); align-items: center; gap: 16px; padding: 15px 14px; border-bottom: 1px solid var(--line); }
dl div:last-child { border-bottom: 0; }
dl .icon { width: 24px; height: 24px; color: var(--navy); stroke-width: 2; }
dt { color: #47607f; }
dd { margin: 0; font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }

/* Khối hạng thành viên: ảnh nền + lớp phủ để chữ dễ đọc */
#profile .tier-card { position: relative; overflow: hidden; background: #fff7e6; border-color: #ecd49a; }
.tier-card::before, .tier-card::after { content: ''; position: absolute; inset: 0; }
.tier-card::before { background: url('images/member-diamond.jpg') right -6px bottom 34px / auto 118% no-repeat; }
.tier-card::after { background: linear-gradient(0deg, #fff4dd 0%, #fff4dd 11%, rgba(255, 244, 221, 0) 32%), linear-gradient(90deg, rgba(255, 247, 230, 0.98) 0%, rgba(255, 247, 230, 0.9) 40%, rgba(255, 247, 230, 0) 70%); }
.tier-card > * { position: relative; z-index: 1; }
.tier-card h2 { color: #8a5a06; }
.tier-card .crown { position: absolute; top: 24px; right: 26px; width: 26px; height: 26px; color: #d6a52c; }
.tier-card dl { max-width: 60%; }
.tier-card dl div { grid-template-columns: 26px 122px minmax(0, 1fr); gap: 14px; padding: 12px 6px 12px 12px; border-bottom-color: rgba(214, 180, 106, 0.35); }
.tier-card dl .icon { color: #8a5a06; }
.tier-card dd { white-space: nowrap; font-size: 16.5px; }
.laurel { position: absolute; right: 30px; bottom: 16px; display: flex; align-items: center; gap: 8px; color: #b98318; text-align: center; }
.laurel b { display: block; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.1; }
.laurel small { font-size: 9.5px; letter-spacing: 0.18em; font-weight: 700; }
.laurel .leaf { width: 18px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.laurel .leaf.flip { transform: scaleX(-1); }
.benefits h3 { font-size: 15px; margin-top: 12px; color: #8a5a06; }
.benefits ul { margin: 6px 0 0; padding-left: 20px; max-width: 62%; }

/* Ảnh viên kim cương chỉ dành cho hạng Kim Cương; các hạng khác dùng phần phong cảnh của ảnh, đổi tông màu */
.tier-card.t-silver::before, .tier-card.t-gold::before, .tier-card.t-vip::before, .tier-card.t-none::before { background-size: 230% auto; background-position: left 60%; opacity: 0.55; }
#profile .tier-card.t-silver { background: #f3f5f8; border-color: #cfd6df; }
.tier-card.t-silver::before { filter: grayscale(1); }
.tier-card.t-silver::after { background: linear-gradient(90deg, rgba(243, 245, 248, 0.98) 0%, rgba(243, 245, 248, 0.86) 45%, rgba(243, 245, 248, 0.2) 100%); }
.tier-card.t-silver h2, .tier-card.t-silver dl .icon, .tier-card.t-silver .laurel, .tier-card.t-silver .crown, .tier-card.t-silver .benefits h3 { color: #566273; }
.tier-card.t-silver .badge.gold { background: radial-gradient(circle at 35% 30%, #fff, #d5dbe3); color: #566273; }
#profile .tier-card.t-vip { background: #f5eefd; border-color: #d6c1f1; }
.tier-card.t-vip::before { filter: hue-rotate(215deg) saturate(0.7); }
.tier-card.t-vip::after { background: linear-gradient(90deg, rgba(245, 238, 253, 0.98) 0%, rgba(245, 238, 253, 0.86) 45%, rgba(245, 238, 253, 0.2) 100%); }
.tier-card.t-vip h2, .tier-card.t-vip dl .icon, .tier-card.t-vip .laurel, .tier-card.t-vip .crown, .tier-card.t-vip .benefits h3 { color: #5b2a9d; }
.tier-card.t-vip .badge.gold { background: radial-gradient(circle at 35% 30%, #fff, #dcc8f6); color: #5b2a9d; }
.tier-card.t-none dl { max-width: none; }

/* Khối Blueway Giving */
#profile .giving { position: relative; overflow: hidden; min-height: 340px; padding: 18px 28px 22px; border-color: #d5e5f5; background: linear-gradient(90deg, rgba(232, 242, 252, 0) 20%, rgba(232, 242, 252, 0.78) 34%, rgba(232, 242, 252, 0.6) 100%), #e3effa url('images/member-giving.jpg') left center / cover no-repeat; }
#profile .giving h2.head { font-size: clamp(22px, 2.5vw, 27px); }
.giving .script { position: absolute; top: 20px; right: 40px; margin: 0; font-size: 23px; line-height: 1.35; transform: rotate(-7deg); text-align: left; }
.giving-body { margin: 16px 0 0 25%; }
.giving-box { background: rgba(255, 255, 255, 0.66); border-radius: 10px; padding: 9px 20px 12px; }
.giving-box small { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--navy); }
.giving-box b { display: block; font-size: clamp(36px, 5vw, 50px); font-weight: 700; line-height: 1.1; color: #0b3a75; }
.giving-text, .giving-note { display: flex; gap: 12px; align-items: flex-start; }
.giving-text { margin: 16px 0 0 8px; max-width: 700px; font-size: 16.5px; color: #1f3556; }
.giving-text .icon { margin-top: 3px; width: 22px; height: 22px; }
.giving-note { margin: 14px 0 0; padding: 9px 14px; border-radius: 8px; background: rgba(255, 255, 255, 0.62); color: #4b668a; font-size: 14.5px; }
.giving-note .icon { margin-top: 1px; }
.giving-link { margin: 14px 0 0; text-align: right; }
.giving-link .btn { padding: 9px 18px; }

/* Bảng hành trình */
.trips-card .badge { width: 48px; height: 48px; }
.trips-card .badge .icon { width: 26px; height: 26px; }
.trips-card table { margin-top: 16px; border: 1px solid var(--line); }
.trips-card th { background: #edf3f9; color: #24406a; padding: 13px 18px; }
.trips-card td { padding: 13px 18px; }
.trips-card td + td { border-left: 1px solid var(--line); }
.trips-card td.tour { font-weight: 600; }
.trips-card td.price { white-space: nowrap; }
.trips-card th:first-child, .trips-card td:first-child { width: 86px; text-align: center; }
.pill { border-radius: 8px; padding: 6px 14px; font-weight: 600; }
.pill .icon { width: 17px; height: 17px; vertical-align: -3.5px; margin-right: 7px; stroke-width: 2.2; }

/* Màn hình vừa và hẹp */
@media (max-width: 900px) {
  .grid.two { grid-template-columns: 1fr; }
  .profile-hero .script { position: static; transform: none; margin-top: 14px; font-size: 20px; white-space: normal; display: inline-block; }
  .giving .script { position: static; transform: none; margin: 10px 0 0; font-size: 19px; display: inline-block; }
  .giving-body { margin-left: 22%; }
}
@media (max-width: 640px) {
  #profile .card { padding: 18px 16px; }
  .profile-hero { background-position: 78% center; }
  .profile-hero::before { background: linear-gradient(180deg, rgba(238, 246, 253, 0.9), rgba(238, 246, 253, 0.72)); }
  .profile-hero .wrap { min-height: 0; padding-top: 34px; padding-bottom: 34px; }
  .head { gap: 12px; }
  .badge { width: 48px; height: 48px; }
  .badge .icon { width: 24px; height: 24px; }
  .badge.blue { width: 54px; height: 54px; }
  .badge.blue .icon { width: 30px; height: 30px; }
  dl div { grid-template-columns: 24px minmax(0, 1fr); gap: 2px 12px; padding: 12px 4px; }
  .tier-card dl div { grid-template-columns: 24px minmax(0, 1fr); padding: 10px 4px; }
  dl dd { grid-column: 2; }
  .tier-card dl, .benefits ul { max-width: none; }
  .tier-card::before { background-position: right center; background-size: cover; }
  .tier-card::after { background: rgba(255, 247, 230, 0.86); }
  .tier-card.t-silver::after { background: rgba(243, 245, 248, 0.88); }
  .tier-card.t-vip::after { background: rgba(245, 238, 253, 0.88); }
  .laurel { position: relative; right: auto; bottom: auto; justify-content: center; margin-top: 12px; }
  /* Ảnh thành một dải phía trên, chữ nằm trên nền sáng bên dưới */
  #profile .giving { min-height: 0; background: linear-gradient(180deg, rgba(238, 245, 252, 0.5) 0, rgba(238, 245, 252, 0.7) 110px, #eef5fc 150px), #eef5fc url('images/member-giving.jpg') left top / auto 150px no-repeat; }
  .giving .head, .giving .script { text-shadow: 0 0 10px #fff; }
  .giving-body { margin: 20px 0 0; }
  .giving-box { background: #fff; }
  .giving-text { margin-left: 0; font-size: 15.5px; }
  .giving-note { background: #fff; }
  /* Bảng tour: mỗi tour một khối, nhãn cột nằm bên trái */
  .trips-card table, .trips-card tbody, .trips-card tr, .trips-card td { display: block; }
  .trips-card thead { display: none; }
  .trips-card table { border: 0; }
  .trips-card tr { border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; margin-top: 12px; }
  .trips-card td, .trips-card td:first-child { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: auto; padding: 8px 0; border: 0; border-top: 1px solid var(--line); text-align: right; }
  .trips-card td:first-child { border-top: 0; }
  .trips-card td + td { border-left: 0; }
  .trips-card td::before { content: attr(data-label); color: var(--muted); font-weight: 500; font-size: 14px; text-align: left; flex: none; }
  .trips-card td.empty { display: block; text-align: center; }
  .trips-card td.empty::before { content: none; }
}
