/* my.jeju — cổng khách hàng JEJU Wedding
   Phong cách A: hiện đại, nền sáng, điểm nhấn hồng đất JEJU */
:root {
  --accent: #b88a83;       /* hồng đất JEJU */
  --accent-dark: #8f625b;
  --accent-soft: #f6ece9;
  --brown: #6d3e28;        /* nâu đất thương hiệu */
  --bg: #f6f3f1;
  --card: #ffffff;
  --ink: #2b2522;
  --muted: #877c76;
  --line: #ece5e0;
  --ok: #3d8a66;
  --ok-soft: #e7f3ec;
  --warn: #b8742a;
  --warn-soft: #fbf1e3;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 40, 30, .04), 0 4px 16px rgba(60, 40, 30, .05);
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: #ebe4df;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
a { color: var(--accent-dark); }
h1, h2, h3, p { margin: 0; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Khung app: full màn hình trên điện thoại, cột giữa trên máy tính */
.app {
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}
@media (min-width: 520px) {
  .app { box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 20px 60px rgba(80, 50, 40, .12); }
}

/* ---------- Thanh trên ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(246, 243, 241, .9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar h1 { font-size: 17px; font-weight: 600; flex: 1; }
.wordmark { flex: 1; display: flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--brown); }
.wordmark b { font-family: var(--serif); font-size: 26px; letter-spacing: .08em; line-height: 1; }
.wordmark span { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: var(--card); box-shadow: var(--shadow);
  cursor: pointer; position: relative; color: var(--ink); text-decoration: none;
}
.icon-btn .dot {
  position: absolute; top: 6px; right: 7px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent-dark); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--card);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
}

/* ---------- Nội dung ---------- */
.page { padding: 4px 16px calc(var(--nav-h) + 28px); }
.page.no-nav { padding-bottom: 32px; }
.hello { padding: 8px 2px 16px; }
.hello p { color: var(--muted); font-size: 14px; }
.hello h2 { font-size: 22px; font-weight: 600; line-height: 1.3; }
.section-title {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 24px 2px 10px; font-size: 13px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
}
.section-title a { text-transform: none; letter-spacing: 0; font-size: 13px; text-decoration: none; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.card + .card { margin-top: 12px; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card.row { display: flex; }

/* Thẻ đếm ngược */
.hero {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #c39890 0%, #a7766e 55%, #8a5d55 100%);
  box-shadow: 0 10px 30px rgba(143, 98, 91, .3);
}
.hero::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 170px; height: 170px; border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.hero small { opacity: .85; font-size: 13px; }
.hero .names { font-size: 19px; font-weight: 600; margin-top: 2px; }
.hero .count { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.hero .count b { font-size: 48px; line-height: 1; font-weight: 700; letter-spacing: -.02em; }
.hero .count span { opacity: .9; }
.hero .date { margin-top: 4px; font-size: 13px; opacity: .85; }

/* Lưới ô tóm tắt */
.grid2 > .card { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card.tile { display: flex; flex-direction: column; gap: 8px; min-height: 118px; }
.tile .ico {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-dark);
}
.tile .ico svg.i { width: 20px; height: 20px; }
.tile .label { font-size: 13px; color: var(--muted); }
.tile .value { font-size: 16px; font-weight: 600; line-height: 1.3; }
.tile .sub { font-size: 12px; color: var(--muted); margin-top: auto; }

/* Dòng danh sách */
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.meta { font-size: 13px; color: var(--muted); }
.row .chev { color: #c4b8b2; }
.list .row { padding: 14px 0; border-top: 1px solid var(--line); }
.list .row:first-child { border-top: 0; padding-top: 2px; }
.list .row:last-child { padding-bottom: 2px; }

/* Nhãn trạng thái */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark); white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.gray { background: #f1edea; color: var(--muted); }

/* Thanh tiến độ */
.bar { height: 8px; border-radius: 4px; background: #f0e9e5; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); }

/* Khối ngày trong lịch */
.datebox {
  width: 52px; flex: none; text-align: center;
  border-radius: 14px; padding: 6px 0;
  background: var(--accent-soft); color: var(--accent-dark);
}
.datebox b { display: block; font-size: 20px; line-height: 1.1; }
.datebox small { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.datebox.past { background: #f1edea; color: var(--muted); }

/* Các bước tiến độ album */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; display: flex; gap: 14px; padding-bottom: 22px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: ''; position: absolute; left: 13px; top: 30px; bottom: 2px;
  width: 2px; background: var(--line);
}
.steps li:last-child::before { display: none; }
.steps li.done::before { background: var(--accent); }
.steps .mark {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; z-index: 1;
  background: #fff; border: 2px solid var(--line); color: #fff;
}
.steps .mark svg.i { width: 16px; height: 16px; stroke-width: 2.4; }
.steps li.done .mark { background: var(--accent); border-color: var(--accent); }
.steps li.current .mark { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.steps li.current .mark::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.steps .t { font-weight: 600; padding-top: 3px; }
.steps li.todo .t { color: var(--muted); font-weight: 500; }
.steps .d { font-size: 13px; color: var(--muted); }
.steps li.current .d { color: var(--accent-dark); font-weight: 500; }

/* Số tiền */
.money-big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; }
.kv.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 14px; font-size: 15px; }
.kv.total span:first-child { color: var(--ink); font-weight: 600; }

/* Hợp đồng */
.items h3 { font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
.items h3:first-child { margin-top: 0; }
.items ul { margin: 0; padding: 0; list-style: none; }
.items li { display: flex; gap: 10px; padding: 5px 0; font-size: 14px; }
.items li svg.i { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
ol.terms { margin: 0; padding-left: 20px; font-size: 14px; }
ol.terms li { padding: 4px 0; }

/* Nút */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 12px 18px;
  border: 0; border-radius: 14px; cursor: pointer;
  font-weight: 600; font-size: 15px; text-decoration: none;
  background: var(--accent-dark); color: #fff;
  transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--accent-soft); color: var(--accent-dark); }
.btn.plain { background: transparent; color: var(--muted); min-height: 44px; font-weight: 500; }
.btn + .btn { margin-top: 10px; }

/* Ảnh / Pixieset */
.gallery-card { padding: 0; overflow: hidden; }
.gallery-cover {
  height: 150px; position: relative;
  background:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,.35) 0 18%, transparent 19%),
    linear-gradient(135deg, #e9d6cf, #c9a39a 60%, #a97f77);
  display: flex; align-items: flex-end; padding: 16px; color: #fff;
}
.gallery-cover b { font-size: 18px; font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.15); }
.gallery-body { padding: 16px; }
.secret {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 14px; padding: 10px 12px; border-radius: 12px;
  background: var(--bg); font-size: 14px;
}
.secret code { font-family: inherit; font-weight: 700; letter-spacing: .04em; flex: 1; }
.secret button { border: 0; background: none; color: var(--accent-dark); font-weight: 600; cursor: pointer; display: flex; gap: 4px; align-items: center; }
.hint { font-size: 13px; color: var(--muted); }
.howto { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.howto li { counter-increment: s; display: flex; gap: 12px; padding: 7px 0; font-size: 14px; }
.howto li::before {
  content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-dark);
}

/* Thông báo */
.notif { display: flex; gap: 12px; padding: 14px 16px; position: relative; }
.notif + .notif { border-top: 1px solid var(--line); }
.notif .ico {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark);
}
.notif .ico svg.i { width: 19px; height: 19px; }
.notif .t { font-weight: 600; font-size: 14px; }
.notif .b { font-size: 14px; color: #5b524d; margin-top: 2px; }
.notif .when { font-size: 12px; color: var(--muted); margin-top: 4px; }
.notif.unread { background: #fdf9f8; }
.notif.unread::after { content: ''; position: absolute; right: 16px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-dark); }

/* ---------- Thanh điều hướng dưới ---------- */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: #a0948e; font-size: 11px; font-weight: 500;
}
.nav a.on { color: var(--accent-dark); font-weight: 600; }
.nav a.on svg.i { stroke-width: 2; }

/* ---------- Đăng nhập & lần đầu ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 24px 24px; }
.auth-head { padding: 64px 0 32px; text-align: center; }
.auth-head .logo { font-family: var(--serif); font-size: 46px; letter-spacing: .14em; color: var(--brown); line-height: 1; }
.auth-head .tag { color: var(--muted); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin-top: 6px; }
.auth h2 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.auth .lead { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 14px; border-radius: 14px;
  background: var(--card); border: 1.5px solid var(--line);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input svg.i { color: #b3a7a1; width: 20px; height: 20px; }
.input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 50px; font-size: 16px; }
.input button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px; }
.help, .field .help { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.err {
  display: none; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px;
  background: #fbeceb; color: #a33b32; font-size: 14px;
}
.err.show { display: block; }
.auth-foot { margin-top: auto; padding-top: 32px; text-align: center; font-size: 12px; color: var(--muted); }
.auth-foot button { border: 0; background: none; color: var(--accent-dark); text-decoration: underline; cursor: pointer; font-size: 12px; }
.demo-note {
  margin-top: 18px; padding: 12px 14px; border-radius: 12px;
  background: var(--warn-soft); color: #7a5420; font-size: 13px;
}
.demo-note b { font-weight: 700; }

/* Các bước lần đầu */
.stepper { display: flex; gap: 6px; margin: 8px 0 28px; }
.stepper i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.stepper i.on { background: var(--accent); }
.otp { display: flex; gap: 8px; justify-content: space-between; }
.otp input {
  width: 100%; max-width: 50px; height: 56px; text-align: center;
  font-size: 22px; font-weight: 700; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--card); outline: 0;
}
.otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.check {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 14px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line);
  font-size: 14px; margin-bottom: 12px;
}
.check input { width: 20px; height: 20px; accent-color: var(--accent-dark); margin: 1px 0 0; flex: none; }
.policy-box { max-height: 220px; overflow: auto; font-size: 13px; color: #5b524d; margin-bottom: 14px; }
.policy-box ul { padding-left: 18px; margin: 6px 0 0; }
.policy-box li { padding: 2px 0; }

/* Trang tài khoản */
.profile { text-align: center; padding: 8px 0 4px; }
.profile .avatar { width: 72px; height: 72px; font-size: 24px; margin: 0 auto 10px; }
.profile h2 { font-size: 18px; font-weight: 600; }
.profile p { font-size: 13px; color: var(--muted); }
.menu .row { padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; cursor: pointer; }
.menu .row:first-child { border-top: 0; padding-top: 2px; }
.menu .row:last-child { padding-bottom: 2px; }
.menu .row > svg.i:first-child { color: var(--accent-dark); }

/* Thông báo nổi (toast) */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(400px, calc(100% - 32px)); width: max-content;
  padding: 12px 16px; border-radius: 14px; z-index: 50;
  background: #2b2522; color: #fff; font-size: 14px; text-align: center; z-index: 70;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Băng "bản mẫu" */
.demo-band {
  text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 5px 8px; background: var(--warn-soft); color: #7a5420;
}

.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

/* ---------- Váy cưới ---------- */
.dress-pic {
  width: 76px; height: 96px; border-radius: 14px; flex: none;
  display: grid; place-items: center; color: rgba(255,255,255,.95);
}
.dress-pic svg.i { width: 34px; height: 34px; stroke-width: 1.4; filter: drop-shadow(0 1px 3px rgba(0,0,0,.15)); }
.steps.compact li { padding-bottom: 14px; }
.steps.compact .mark { width: 22px; height: 22px; }
.steps.compact li::before { left: 10px; top: 24px; }
.steps.compact .mark svg.i { width: 13px; height: 13px; }
.steps.compact li.current .mark::after { width: 8px; height: 8px; }
.steps.compact .t { font-size: 14px; padding-top: 1px; }

/* ---------- Thiệp cưới ---------- */
.invite-cover {
  justify-content: center; align-items: center; text-align: center; height: 170px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.35) 0 14%, transparent 15%),
    linear-gradient(160deg, #f3e6df, #d8b5ab 55%, #b88a83);
}
.invite-cover > div { display: flex; flex-direction: column; gap: 2px; }
.invite-cover b { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.15; }
.invite-cover small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat b { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; }
.bar.split { background: #d9c9c3; }

/* ---------- Logo JEJU Wedding (file trắng nền trong suốt, tô màu bằng mặt nạ) ---------- */
.logo {
  display: block; aspect-ratio: 900 / 584; background-color: currentColor;
  -webkit-mask: url(/assets/icons/logo-trang.png) center / contain no-repeat;
          mask: url(/assets/icons/logo-trang.png) center / contain no-repeat;
}
.wordmark { align-items: center; gap: 8px; }
.wordmark .logo { height: 40px; color: var(--brown); }
.wordmark span:not(.logo) { padding-top: 6px; }
.auth-head .logo { width: 172px; margin: 0 auto; color: var(--brown); font-size: 0; }
.hero-logo { position: absolute; top: 16px; right: 18px; width: 62px; color: #fff; opacity: .92; z-index: 1; }

/* Chọn hợp đồng (khách có nhiều hợp đồng cùng SĐT) */
.contract-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.contract-tabs button {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--ink);
}
.contract-tabs button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }

/* ---------- Kế hoạch cưới ---------- */
.tap { cursor: pointer; }
.tools { display: flex; gap: 8px; margin: 14px 0 0; }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; width: auto; flex: 1; }
.tools .btn + .btn { margin-top: 0; }
.btn.danger { color: #a33b32; }
.chips { display: flex; gap: 8px; margin: 14px 0 10px; flex-wrap: wrap; }
.chips button {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; cursor: pointer; color: var(--ink);
}
.chips button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.input.search { min-height: 44px; }
.input.search input { height: 42px; font-size: 15px; }
.input select, .input textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink);
}
.input select { height: 50px; }
.input textarea { padding: 12px 0; resize: vertical; font-family: inherit; }
.input .unit { color: var(--muted); font-size: 14px; }
.sent { color: var(--ok); display: inline-flex; vertical-align: -3px; }
.sent svg.i { width: 15px; height: 15px; }

/* Nút + nổi (trên thanh menu dưới) */
.fab {
  position: fixed; z-index: 15; right: max(16px, calc(50% - 220px + 16px));
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 6px;
  height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent-dark); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 22px rgba(143, 98, 91, .35);
}
.fab svg.i { width: 20px; height: 20px; stroke-width: 2.2; }
.page:has(.fab) { padding-bottom: calc(var(--nav-h) + 96px); }

/* Ô tích việc cần làm */
.tick {
  width: 26px; height: 26px; flex: none; border-radius: 8px; cursor: pointer; padding: 0;
  border: 2px solid #d3c6c0; background: var(--card); color: #fff; display: grid; place-items: center;
}
.tick.on { background: var(--accent); border-color: var(--accent); }
.tick svg.i { width: 16px; height: 16px; stroke-width: 2.6; }
.task.done .title { color: var(--muted); text-decoration: line-through; font-weight: 500; }

/* Lịch trình ngày cưới */
.timeline { padding: 8px 16px; }
.tl-item { display: flex; gap: 12px; padding: 12px 0; position: relative; }
.tl-item + .tl-item { border-top: 1px solid var(--line); }
.tl-time { width: 50px; flex: none; font-weight: 700; color: var(--accent-dark); padding-top: 1px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }

/* Khung nhập liệu kéo từ dưới lên */
body.no-scroll { overflow: hidden; }
.sheet-wrap {
  position: fixed; inset: 0; z-index: 60; background: rgba(43, 37, 34, 0);
  display: flex; align-items: flex-end; justify-content: center; transition: background .2s;
}
.sheet-wrap.show { background: rgba(43, 37, 34, .45); }
.sheet {
  width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; background: var(--bg);
  border-radius: 22px 22px 0 0; padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .22s ease;
}
.sheet-wrap.show .sheet { transform: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: #d8cdc8; margin: 4px auto 14px; }
.sheet h2 { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1; min-width: 72px; min-height: 42px; border-radius: 12px; cursor: pointer; font-size: 14px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
}
.seg button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-wrap { transition: none; } }
.multi .check.sm { padding: 11px 12px; margin-bottom: 8px; gap: 10px; align-items: center; }

/* Sửa ngày cưới (chỉ trong cổng) */
.hero.tap { cursor: pointer; }
.hero-edit { display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.22); font-size: 12px; font-weight: 600; }
.date-note {
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--warn-soft); color: #7a5420; font-size: 13px;
}

/* Ô ngày kiểu Việt Nam: Ngày / Tháng / Năm */
.vndate { display: grid; grid-template-columns: 0.8fr 1.3fr 1fr; gap: 8px; }
.vndate .input { padding: 0 10px; }
.vndate select { width: 100%; }
.vndate-read { color: var(--accent-dark); font-weight: 600; min-height: 18px; }

/* ---------- Đánh giá nhân viên ---------- */
.review-banner { margin-top: 12px; border: 1.5px solid var(--accent); background: var(--accent-soft); }
.review-person + .review-person { margin-top: 18px; }
.review-person .title { margin-bottom: 8px; }
.scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; width: 100%; max-width: 400px; }
.scale button { min-width: 0; width: 100%; aspect-ratio: 1; border: 0; background: none; padding: 2px; cursor: pointer; color: #e3d8d2; transition: transform .1s; }
.scale button svg { width: 100%; height: auto; max-width: 100%; fill: currentColor; display: block; }
.scale button { -webkit-appearance: none; appearance: none; line-height: 0; }
.scale button.on { color: #e7a83b; }
.scale button:active { transform: scale(1.15); }
.scale-read { font-size: 13px; color: var(--muted); margin-top: 6px; min-height: 18px; }
.scale-read b { color: var(--ink); }
.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.stars i { width: 16px; height: 16px; color: #e3d8d2; }
.stars i.on { color: #e7a83b; }
.stars i svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.score-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.review-person + .field, .review-person + .btn { margin-top: 18px; }
.card > .field { margin-top: 18px; }
.review-done { display: flex; gap: 12px; align-items: flex-start; }
.review-done > svg.i { width: 28px; height: 28px; color: var(--ok); stroke-width: 2.4; }

/* Đầu mỗi phần đánh giá: nổi bật */
.review-card { margin-top: 14px; padding-top: 0; overflow: hidden; }
.review-head {
  display: flex; align-items: center; gap: 10px; margin: 0 -16px 16px; padding: 14px 16px;
  background: linear-gradient(135deg, #f6ece9, #efdcd6); border-bottom: 1px solid var(--line);
}
.review-head h2 { flex: 1; font-size: 17px; font-weight: 700; color: var(--brown); line-height: 1.3; }
.review-ico {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--accent-dark); color: #fff;
}
.review-ico svg.i { width: 20px; height: 20px; }

/* Trang phục đi chụp */
.outfit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.outfit-grid a { display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--accent-soft); }
.outfit-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; gap: 10px; padding: 4px 0; font-size: 14px; }
.plain-list li svg.i { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }

/* Thiệp cưới online — màn hình sửa thiệp (thiep.js) */
#tc-editor .grid2 > *, #tc-editor .grid2 .field { min-width: 0; }
#tc-editor input[type=date], #tc-editor input[type=time] { width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; text-align: left; }
#tc-editor .input select { width: 100%; }

/* Thiệp cưới — tiêu đề các phần có dấu tích (Lễ, Tiệc, Chuyện tình, Mừng cưới…): nền hồng đất nhạt, chữ nâu,
   khác hẳn phần nội dung bên dưới cho dễ nhìn (Sếp 10/11/2026) */
.tc-toggle { background: var(--accent-soft); border: 1px solid #ead7d2; border-radius: 14px; padding: 12px 14px; margin-top: 18px; }
.tc-toggle b { color: var(--brown); font-size: 15px; }
.tc-toggle .meta { color: #8a6f68; }
.tc-toggle:has(input:checked) { background: #efdcd7; border-color: var(--accent); }

/* Chế độ chỉ thiệp: menu dưới 2 nút (Thiệp cưới · Ngân sách) — Sếp 10/11/2026 */
.nav.nav-2 { grid-template-columns: repeat(3, 1fr); }

/* ===== Làm thiệp KIỂU 4: 13 phần xếp dọc (Sếp chốt 10/11/2026, làm thật 11/11/2026) ===== */
.k4-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 0 2px 16px; }
.k4-prog { flex: none; white-space: nowrap; } .k4-prog b { color: var(--brown); }
.k4-st { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 14px; padding-bottom: 16px; }
.k4-st::before { content: ''; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: #e3d8d1; }
.k4-st:last-child::before { display: none; }
.k4-st.done::before { background: var(--ok); opacity: .45; }
.k4-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: #fff; color: var(--muted); border: 2px solid #e3d8d1; position: relative; z-index: 1; }
.k4-st.on .k4-num { background: var(--brown); border-color: var(--brown); color: #fff; box-shadow: 0 0 0 5px var(--accent-soft); }
.k4-st.done .k4-num { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 17px; }
.k4-st.off .k4-num { background: #f1edea; color: #b3a8a2; border-style: dashed; }
.k4-hd { padding-top: 8px; cursor: pointer; min-width: 0; }
.k4-hd b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.k4-hd b em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); background: #efe9e5; border-radius: 99px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.k4-hd small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.k4-hd small i { font-style: normal; color: var(--accent-dark); font-weight: 600; }
.k4-st.done .k4-hd small { color: var(--ok); }
.k4-st.off .k4-hd small, .k4-st.todo .k4-hd small { color: #a99d97; }
.k4-bd { grid-column: 2; margin-top: 12px; animation: k4open .3s ease; min-width: 0; }
@keyframes k4open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.k4-bd .card + .card, .k4-card + .k4-card { margin-top: 12px; }
.k4-card { padding: 16px; }
.k4-ct, .k4-lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.k4-cardhd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.k4-opt { color: var(--muted); font-weight: 400; }
.k4-link { border: 0; background: none; padding: 0; color: var(--accent-dark); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: underline; }
.k4-row { display: flex; gap: 12px; align-items: flex-end; }
.k4-show { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; font-weight: 600; font-size: 14px; cursor: pointer; }
.k4-tog { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: #d9cdc6; position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.k4-tog::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.k4-tog:checked { background: var(--brown); } .k4-tog:checked::after { transform: translateX(18px); }
.k4-auto { background: var(--ok-soft); color: var(--ok); border-radius: 14px; padding: 10px 14px; font-size: 13px; margin-top: 10px; }
.k4-note { background: var(--accent-soft); color: var(--accent-dark); border-radius: 14px; padding: 12px 14px; font-size: 13px; margin-top: 12px; line-height: 1.5; }
.k4-keep { margin-top: 12px; background: #fff4e5; border: 1.5px solid #f0c48a; color: #8a5a1c; border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; }
.k4-keep b { color: #6d3e10; }
.k4-tpl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.k4-tpl button { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink); text-align: center; font-family: inherit; }
.k4-tpl img { display: block; width: 100%; aspect-ratio: 585 / 1266; object-fit: cover; border-radius: 14px; border: 2.5px solid transparent; margin-bottom: 6px; background: #eee; }
.k4-tpl button.on img { border-color: var(--brown); box-shadow: 0 0 0 3px var(--accent-soft); }
.k4-tpl button.on span { color: var(--brown); }
.k4-slot { flex: none; }
.k4-img { position: relative; width: 100%; border-radius: 14px; background: #f1edea center / cover no-repeat; }
.k4-img button { position: absolute; right: 6px; top: 6px; border: 0; border-radius: 8px; background: rgba(0,0,0,.55); color: #fff; width: 28px; height: 28px; cursor: pointer; }
.k4-chg { display: block; margin-top: 6px; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 0; font-size: 12.5px; font-weight: 600; color: var(--brown); cursor: pointer; text-align: center; }
.k4-add { flex: none; display: grid; place-content: center; text-align: center; gap: 2px; border-radius: 14px; background: #f6f1ee; border: 1.5px dashed #d8ccc5; color: var(--muted); cursor: pointer; padding: 6px; }
.k4-add span { font-size: 24px; line-height: 1; } .k4-add small { font-size: 12px; font-weight: 600; }
.k4-story + .k4-story { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.k4-pick { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.k4-pick + .k4-pick { margin-top: 10px; }
.k4-pick input { margin: 3px 0 0; accent-color: var(--brown); width: 18px; height: 18px; flex: none; }
.k4-pick b { display: block; font-size: 14px; } .k4-pick small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.45; }
.k4-pick.on { border-color: var(--brown); background: var(--accent-soft); }
.k4-song { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--brown); background: var(--accent-soft); border-radius: 14px; padding: 10px 12px; }
.k4-song > span:nth-child(2) { flex: 1; min-width: 0; } .k4-song b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .k4-song small { color: var(--muted); font-size: 12.5px; }
.k4-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brown); color: #fff; font-size: 14px; cursor: pointer; flex: none; }
.k4-share { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.k4-si { position: relative; aspect-ratio: 1.91 / 1; background: #eee center 30% / cover no-repeat; }
.k4-sharechg { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); border-radius: 999px; padding: 11px 22px; background: var(--brown); color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: 0 4px 14px rgba(0,0,0,.3); cursor: pointer; white-space: nowrap; }
.k4-sx { padding: 10px 12px; background: #f4f5f7; } .k4-sx small { display: block; font-size: 11px; color: #8a8f98; letter-spacing: .04em; }
.k4-sx b { display: block; font-size: 14px; margin: 2px 0; } .k4-sx span { display: block; font-size: 12.5px; color: #65676b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k4-lk { display: flex; gap: 8px; } .k4-lk .input { flex: 1; min-width: 0; }
.k4-cp { flex: none; border: 0; border-radius: 14px; padding: 0 16px; font-weight: 600; font-size: 14px; background: var(--brown); color: #fff; cursor: pointer; }
.k4-mg-bg { position: fixed; inset: 0; background: rgba(30,20,15,.4); z-index: 40; }
.k4-mg { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 520px; background: #fff; border-radius: 24px 24px 0 0; z-index: 41; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); animation: k4up .3s ease; }
@keyframes k4up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.k4-mg ol { padding-left: 20px; margin: 12px 0 18px; font-size: 14px; } .k4-mg li + li { margin-top: 8px; }
.k4 .grid2 > .field { min-width: 0; }

/* Ô link thiệp (11/11/2026): phần "jeju.vn/thiepcuoi/" nằm riêng 1 dòng để ô sửa link không bị ép mất trên điện thoại */
.k4-pre { font-size: 13px; color: var(--muted); margin: 0 0 6px 2px; word-break: break-all; }
.k4-linkbox { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; font-weight: 600; font-size: 15px; color: var(--ink); word-break: break-all; background: #faf8f6; }

/* ================= MÁY TÍNH (Sếp yêu cầu 11/11/2026) =================
   Điện thoại giữ nguyên. Từ 1024px: menu thành cột trái có logo, nội dung rộng ra;
   trang làm thiệp chia 2 cột: danh sách 13 phần bên trái, ô sửa bên phải. */
.nav-brand { display: none !important; }
.k4-offnote { color: var(--muted); font-size: 14px; background: #fff; border-radius: 14px; padding: 14px 16px; }
@media (min-width: 1024px) {
  body { background: var(--bg); }
  .app:not(:has(.auth)) { max-width: none; box-shadow: none; }
  .app:has(> .nav) { padding-left: 248px; }
  .nav { left: 0; top: 0; bottom: 0; transform: none; width: 248px; max-width: none; height: auto;
    display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; border-top: 0; border-right: 1px solid var(--line); background: #fff; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 15px; color: var(--ink); }
  .nav a:hover { background: #f6f1ee; }
  .nav a.on { background: var(--accent-soft); color: var(--accent-dark); }
  .nav .nav-brand { display: block !important; padding: 2px 12px 22px; color: var(--brown); }
  .nav .nav-brand:hover { background: none; }
  .nav .nav-brand .logo { width: 104px; }
  .topbar { padding: 16px 32px; }
  .app:has(> .nav) .topbar .wordmark { visibility: hidden; }
  .page { max-width: 860px; margin: 0 auto; padding: 8px 32px 56px; }
  .page.no-nav { padding-bottom: 56px; }
  .page:has(#tc-editor) { max-width: 1180px; }
  .toast { bottom: 32px; }
  .fab { right: 40px; bottom: 32px; }
  .demo-band { position: relative; z-index: 11; }

  /* Trang làm thiệp: 2 cột */
  .k4w { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: start; }
  .k4w-side { position: sticky; top: 84px; background: #fff; border-radius: 20px; padding: 10px; box-shadow: 0 1px 2px rgba(60,40,30,.04), 0 4px 16px rgba(60,40,30,.05); max-height: calc(100vh - 190px); overflow: auto; }
  .k4w-prog { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 6px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
  .k4w-prog b { color: var(--brown); }
  .k4l { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 14px; cursor: pointer; font-family: inherit; color: var(--ink); }
  .k4l:hover { background: #f8f4f2; }
  .k4l.on { background: var(--accent-soft); }
  .k4l .k4-num { width: 32px; height: 32px; font-size: 13px; border-width: 2px; }
  .k4l.on .k4-num { background: var(--brown); border-color: var(--brown); color: #fff; box-shadow: none; }
  .k4l.done .k4-num { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 15px; }
  .k4l.off .k4-num { background: #f1edea; color: #b3a8a2; border-style: dashed; }
  .k4l-tx { min-width: 0; flex: 1; }
  .k4l-tx b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
  .k4l-tx small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .k4l.done .k4l-tx small { color: var(--ok); }
  .k4l.off .k4l-tx b, .k4l.off .k4l-tx small { color: #b3a8a2; }
  .k4w-main { max-width: 720px; min-width: 0; }
  .k4w-head { margin: 4px 0 16px; }
  .k4w-no { font-size: 12.5px; font-weight: 600; color: var(--accent-dark); letter-spacing: .04em; text-transform: uppercase; }
  .k4w-head h2 { font-size: 24px; font-weight: 600; margin: 4px 0 2px; }
  .k4w-head h2 em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); background: #efe9e5; border-radius: 99px; padding: 3px 10px; margin-left: 10px; vertical-align: 4px; }
  .k4w-head p { color: var(--muted); font-size: 14.5px; }
  .k4w-main .k4-bd { margin-top: 0; }
  .k4w-main .k4-tpl { max-width: 520px; }
  .k4w-nav { display: flex; gap: 10px; margin-top: 18px; }
  .k4w-nav .btn { width: auto; flex: 1; margin: 0; }
  .k4w-nav .btn + .btn { margin-top: 0; }
}

/* Lịch trình ngày cưới trong trang làm thiệp (11/11/2026) */
.k4-schrow { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 10px; }
.k4-schrow .field { min-width: 0; }
.k4-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.k4-icons button { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; }
.k4-icons button svg { width: 22px; height: 22px; }
.k4-icons button.on { border-color: var(--brown); background: var(--accent-soft); color: var(--brown); }

/* Ô giờ lễ / tiệc nằm dưới ô ngày (11/11/2026) */
.k4-time { max-width: 180px; }

/* Tên, bố mẹ, địa chỉ: hiện chữ cái đầu viết hoa NGAY khi gõ (Sếp 11/11/2026). Chỉ đổi cách hiện nên bộ gõ
   tiếng Việt (Unikey, EVKey, Telex) không bị lỗi; rời ô thì chữ thật được viết hoa để lưu (thiep.js capWords). */
#tc-editor [data-cap] { text-transform: capitalize; }
