:root {
  --pink: #e8457a; --pink-600: #d33468; --pink-400: #f27aa0; --pink-100: #ffe1eb; --pink-50: #fff2f6;
  --mint: #3fae9e; --mint-100: #d6f1ec; --mint-50: #ecf8f5;
  --lav: #7c6cf0; --lav-100: #e6e2ff; --lav-50: #f3f1ff;
  --blue: #3b82f6; --blue-100: #dbe8ff; --blue-50: #eef4ff;
  --amber: #e98a0c; --amber-100: #ffe8c7; --amber-50: #fff6ea;
  --red: #e5484d; --red-100: #ffdfe0;
  --gray: #8a8fa8; --gray-100: #eceef4;
  --ink: #1d2657; --text: #3d4468; --muted: #8b90aa; --line: #f3e6ec;
  --bg: #fff6f8; --card: #ffffff; --soft: #fff9fb;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(232, 69, 122, .07), 0 1px 3px rgba(29, 38, 87, .04);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Dancing Script', cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--ink); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 700; }
svg.lucide { width: 18px; height: 18px; stroke-width: 1.9; flex-shrink: 0; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: 68px; display: flex; align-items: center; gap: 20px; padding: 0 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; height: 34px; }
.logo img { height: 34px; width: auto; }
.topnav { display: flex; gap: 6px; margin-left: 24px; }
.topnav a { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; color: var(--text); font-weight: 500; }
.topnav a:hover { background: var(--pink-50); }
.topnav a.active { background: var(--pink-50); color: var(--pink); }
.topsearch { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.topsearch input { width: 100%; padding: 10px 14px 10px 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); outline: none; }
.topsearch input:focus { border-color: var(--pink-400); background: #fff; }
.topsearch > svg { position: absolute; left: 14px; top: 11px; color: var(--muted); }
.search-drop { position: absolute; top: 46px; left: 0; right: 0; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(29, 38, 87, .15); padding: 6px; max-height: 360px; overflow: auto; }
.search-drop a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.search-drop a:hover { background: var(--pink-50); }
.top-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.topsearch + .top-right { margin-left: 16px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text); }
.icon-btn:hover { background: var(--pink-50); color: var(--pink); }
.dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); border: 2px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 14px; position: relative; }
.user-chip:hover { background: var(--pink-50); }
.user-chip .nm { font-weight: 600; color: var(--ink); line-height: 1.2; }
.user-chip .sub { font-size: 12px; color: var(--muted); }
.menu { position: absolute; right: 0; top: 52px; min-width: 220px; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(29, 38, 87, .15); padding: 6px; z-index: 50; }
.menu button, .menu a { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--pink-50); color: var(--pink); }

.shell { display: flex; min-height: calc(100vh - 68px); }
.sidebar { width: 236px; flex-shrink: 0; padding: 20px 14px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .6); position: sticky; top: 68px; height: calc(100vh - 68px); display: flex; flex-direction: column; overflow-y: auto; }
.side-brand { padding: 4px 12px 16px; }
.side-brand b { font-size: 22px; color: var(--ink); font-weight: 800; letter-spacing: -.5px; }
.side-brand b span { color: var(--pink); }
.side-brand small { display: block; color: var(--muted); }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; margin-bottom: 4px; font-weight: 500; }
.sidebar nav a:hover { background: var(--pink-50); }
.sidebar nav a.active { background: var(--pink-100); color: var(--pink); font-weight: 600; }
.side-quote { margin-top: auto; padding: 20px 12px 8px; }
.side-quote .script { font-size: 21px; line-height: 1.35; }
.side-quote .foot { margin-top: 26px; font-size: 12px; color: var(--muted); }
.side-quote .foot b { display: block; color: var(--ink); font-size: 14px; }
.content { flex: 1; min-width: 0; padding: 24px 28px 40px; }
.bottomnav { display: none; }

/* ---------- Common ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; border: 1px solid rgba(243, 230, 236, .7); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-size: 17px; }
.card-h .link { color: var(--pink); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g5 { grid-template-columns: repeat(5, 1fr); }
.main-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.main-side-l { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); } .small { font-size: 12px; } .xs { font-size: 11px; }
.bold { font-weight: 600; color: var(--ink); }
.pink { color: var(--pink); }
.script { font-family: var(--script); color: var(--pink); font-weight: 500; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px; font-weight: 600; transition: .15s; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, #f0558a, #e03a70); color: #fff; box-shadow: 0 6px 16px rgba(232, 69, 122, .28); }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-soft { background: var(--pink-50); color: var(--pink); }
.btn-soft:hover { background: var(--pink-100); }
.btn-outline { border: 1.5px solid var(--pink-100); color: var(--pink); background: #fff; }
.btn-outline:hover { border-color: var(--pink-400); }
.btn-ghost { color: var(--text); background: #fff; border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--pink-400); color: var(--pink); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag.pink { background: var(--pink-50); color: var(--pink); } .tag.mint { background: var(--mint-50); color: var(--mint); }
.tag.lav { background: var(--lav-50); color: var(--lav); } .tag.blue { background: var(--blue-50); color: var(--blue); }
.tag.amber { background: var(--amber-50); color: var(--amber); } .tag.red { background: #fff0f0; color: var(--red); }
.tag.gray { background: var(--gray-100); color: var(--gray); }
.tag .bullet { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 500; font-size: 13px; color: var(--text); white-space: nowrap; }
.chip:hover { border-color: var(--pink-400); }
.chip.active { background: var(--pink); color: #fff; border-color: var(--pink); }
.chip .n { background: rgba(255, 255, 255, .3); padding: 0 7px; border-radius: 999px; font-size: 11px; }
.chip:not(.active) .n { background: var(--pink-50); color: var(--pink); }

.ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.ic svg.lucide { width: 22px; height: 22px; }
.ic.pink { background: var(--pink-50); color: var(--pink); } .ic.mint { background: var(--mint-50); color: var(--mint); }
.ic.lav { background: var(--lav-50); color: var(--lav); } .ic.blue { background: var(--blue-50); color: var(--blue); }
.ic.amber { background: var(--amber-50); color: var(--amber); } .ic.red { background: #fff0f0; color: var(--red); }
.ic.sm { width: 36px; height: 36px; border-radius: 11px; } .ic.sm svg.lucide { width: 18px; height: 18px; }
.ic.lg { width: 56px; height: 56px; border-radius: 18px; } .ic.lg svg.lucide { width: 26px; height: 26px; }

.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 84px; height: 84px; font-size: 26px; border: 4px solid #fff; box-shadow: var(--shadow); }
.av.xl { width: 120px; height: 120px; font-size: 34px; border: 5px solid #fff; box-shadow: var(--shadow); }
.av.c0 { background: var(--pink-50); color: var(--pink); } .av.c1 { background: var(--blue-50); color: var(--blue); }
.av.c2 { background: var(--lav-50); color: var(--lav); } .av.c3 { background: var(--mint-50); color: var(--mint); } .av.c4 { background: var(--amber-50); color: var(--amber); }
.av.staff { background: var(--pink); color: #fff; }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 22px; background: linear-gradient(115deg, #fff 0%, #fff4f7 45%, #ffe6ee 100%); padding: 28px 32px; min-height: 170px; display: flex; align-items: center; margin-bottom: 20px; border: 1px solid var(--line); }
.hero h1 { font-size: 30px; letter-spacing: -.5px; }
.hero p { margin: 8px 0 0; max-width: 520px; }
.hero .hero-txt { position: relative; z-index: 2; max-width: 60%; }
.hero img.hero-img { position: absolute; right: 205px; bottom: 0; height: 100%; max-height: 190px; object-fit: contain; mix-blend-mode: multiply; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 85%, transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 85%, transparent 100%); }
.hero .hero-script { position: absolute; right: 22px; top: 50%; transform: translateY(-50%) rotate(-6deg); font-size: 20px; line-height: 1.3; text-align: left; width: 170px; z-index: 2; }
.hero.compact { min-height: 140px; }

/* KPI */
.kpi { display: flex; align-items: center; gap: 14px; padding: 18px; }
.kpi .v { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1; }
.kpi .l { color: var(--text); margin-top: 4px; }
.kpi .d { font-size: 12px; margin-top: 4px; }
.up { color: var(--pink); } .down { color: var(--mint); }
button.kpi { text-align: left; width: 100%; }
button.kpi:hover { border-color: var(--pink-100); transform: translateY(-1px); }

/* list items */
.li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--soft); border-radius: 12px; }
.li .t { font-weight: 600; color: var(--ink); }
.chev { color: var(--pink); background: var(--pink-50); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.chev svg.lucide { width: 16px; height: 16px; }

/* table */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 600; color: var(--ink); font-size: 12.5px; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--soft); }
.tbl th:first-child { border-radius: 10px 0 0 10px; } .tbl th:last-child { border-radius: 0 10px 10px 0; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--soft); }
.tbl tr.sel td { background: var(--pink-50); }
.tbl input[type=checkbox] { accent-color: var(--pink); width: 16px; height: 16px; }

/* cycle progress */
.cycle-bar { position: relative; height: 12px; border-radius: 999px; background: var(--gray-100); margin: 22px 0 10px; }
.cycle-bar .fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #ffc0d2, var(--pink)); }
.cycle-bar .heart { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 3px 10px rgba(232, 69, 122, .35); color: var(--pink); }
.cycle-bar .heart svg { fill: var(--pink); width: 16px; height: 16px; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); font-size: 12px; color: var(--muted); }
.phases span:nth-child(2) { text-align: center; } .phases span:nth-child(3) { text-align: center; } .phases span:last-child { text-align: right; }
.phases span.on { color: var(--pink); font-weight: 600; }
.stat { display: flex; gap: 10px; align-items: center; background: var(--pink-50); border-radius: 14px; padding: 12px; }
.stat.mint { background: var(--mint-50); }
.stat .l { font-size: 12px; color: var(--muted); }
.stat .v { font-weight: 700; color: var(--ink); font-size: 16px; }

/* timeline */
.milestones { display: flex; justify-content: space-between; position: relative; margin: 10px 0; }
.milestones::before { content: ''; position: absolute; left: 8%; right: 8%; top: 22px; height: 2px; background: repeating-linear-gradient(90deg, var(--pink-100) 0 6px, transparent 6px 10px); }
.ms { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; font-size: 12px; }
.ms .ic { border-radius: 50%; border: 3px solid #fff; box-shadow: var(--shadow); }
.ms.done .ic { background: var(--pink); color: #fff; }
.ms.now .ic { outline: 2px solid var(--pink); }
.ms b { color: var(--ink); font-weight: 600; margin-top: 6px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.input, .field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #efdfe6; background: #fff; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--pink-400); box-shadow: 0 0 0 3px var(--pink-50); }
textarea { resize: vertical; }
.search { position: relative; }
.search input { width: 100%; padding: 11px 14px 11px 40px; border-radius: 14px; border: 1px solid var(--line); background: #fff; outline: none; }
.search input:focus { border-color: var(--pink-400); }
.search svg { position: absolute; left: 14px; top: 12px; color: var(--muted); }
select.input { padding: 9px 12px; }

.toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { display: none; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: #d8dbe6; transition: .2s; cursor: pointer; }
.toggle span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.toggle input:checked + span { background: var(--pink); }
.toggle input:checked + span::after { left: 21px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { padding: 10px 16px; font-weight: 500; color: var(--text); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--pink); border-color: var(--pink); font-weight: 600; }
.seg { display: flex; background: var(--pink-50); padding: 4px; border-radius: 14px; gap: 4px; }
.seg button { flex: 1; padding: 8px 6px; border-radius: 10px; font-weight: 500; font-size: 13px; white-space: nowrap; }
.seg button.active { background: var(--pink); color: #fff; box-shadow: 0 4px 10px rgba(232, 69, 122, .25); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(29, 38, 87, .35); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
.modal { background: #fff; border-radius: 22px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; padding: 24px; box-shadow: 0 30px 80px rgba(29, 38, 87, .25); animation: pop .18s; }
.modal.wide { max-width: 760px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.modal-h h3 { font-size: 19px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }

.toast-wrap { position: fixed; top: 80px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); display: flex; gap: 10px; align-items: center; animation: pop .2s; max-width: 360px; }
.toast svg { color: #7ff0d6; }

.rule-box { border-radius: 14px; padding: 14px; background: linear-gradient(135deg, var(--pink-50), #fff); border: 1px dashed var(--pink-400); }
.ai-box { border-radius: 16px; padding: 16px; background: linear-gradient(135deg, #fff3f7, #fdf2ff); border: 1px solid var(--pink-100); white-space: pre-line; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty svg.lucide { width: 34px; height: 34px; color: var(--pink-400); margin-bottom: 6px; }
.quote-band { margin-top: 20px; border-radius: 18px; padding: 18px 26px; background: linear-gradient(90deg, #fff, #ffeef3, #fff); display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.quote-band .script { font-size: 22px; }
.pager { display: flex; gap: 6px; align-items: center; }
.pager button { min-width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; }
.pager button.active { background: var(--pink); color: #fff; border-color: var(--pink); }
.check-li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; }
.check-li input { accent-color: var(--pink); width: 17px; height: 17px; margin-top: 2px; }
.check-li.done span { text-decoration: line-through; color: var(--muted); }

/* calendar month */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .wd { font-size: 12px; color: var(--muted); padding: 6px 0; font-weight: 600; }
.cal .d { position: relative; aspect-ratio: 1; max-height: 46px; display: grid; place-items: center; border-radius: 50%; font-weight: 500; color: var(--ink); cursor: pointer; margin: 0 auto; width: 100%; max-width: 46px; }
.cal .d:hover { background: var(--pink-50); }
.cal .d.out { color: #c9ccd9; }
.cal .d.today { background: var(--pink); color: #fff; }
.cal .d.has::after { content: ''; position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--pink); }
.cal .d.today.has::after { background: #fff; }
.cal .d.sel:not(.today) { background: var(--mint-100); }

/* week calendar */
.week-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-head button { border-radius: 14px; padding: 10px 4px; text-align: center; border: 1px solid transparent; }
.week-head button:hover { background: var(--soft); }
.week-head button.active { background: var(--pink-50); border-color: var(--pink-100); color: var(--pink); }
.week-head b { display: block; color: var(--ink); }
.week-head button.active b { color: var(--pink); }
.dayview { position: relative; margin-top: 12px; }
.dayview .hr { display: flex; height: 56px; border-top: 1px dashed var(--line); }
.dayview .hr span { width: 56px; font-size: 12px; color: var(--muted); transform: translateY(-9px); background: #fff; height: 18px; }
.dayview .blocks { position: absolute; left: 66px; right: 0; top: 0; bottom: 0; }
.ablock { position: absolute; border-radius: 12px; padding: 5px 10px; font-size: 12px; line-height: 1.3; overflow: hidden; cursor: pointer; border-left: 4px solid; transition: .15s; }
.ablock:hover { transform: translateX(2px); box-shadow: var(--shadow); }
.ablock b { display: block; color: var(--ink); font-size: 12.5px; line-height: 1.3; }
.ablock.pink { background: #ffe8ef; border-color: var(--pink); } .ablock.blue { background: #e6f0ff; border-color: var(--blue); }
.ablock.mint { background: #ddf4ee; border-color: var(--mint); } .ablock.lav { background: #ece9ff; border-color: var(--lav); } .ablock.amber { background: #fff0db; border-color: var(--amber); }
.ablock.sel { box-shadow: 0 0 0 2px var(--pink); }

/* chat */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; padding: 4px; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; white-space: pre-line; }
.bubble.me { align-self: flex-end; background: var(--pink); color: #fff; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: var(--pink-50); color: var(--ink); border-bottom-left-radius: 4px; }
.bubble small { display: block; opacity: .7; font-size: 10.5px; margin-top: 2px; }

/* article */
.art-card { overflow: hidden; padding: 0; cursor: pointer; transition: .15s; display: flex; flex-direction: column; }
.art-card:hover { transform: translateY(-2px); }
.thumb { width: 100%; aspect-ratio: 2/1; object-fit: cover; display: block; background: linear-gradient(135deg, #ffe1eb, #e6f7f3); display: grid; place-items: center; font-size: 44px; }
img.thumb { display: block; }
.art-card .body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.art-card h4 { font-size: 14.5px; line-height: 1.35; }
.meta { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 10px; }
.meta span { display: flex; gap: 4px; align-items: center; } .meta svg.lucide { width: 14px; height: 14px; }
.bm { margin-left: auto; color: var(--pink); } .bm.on svg { fill: var(--pink); }
.article-body h2 { font-size: 18px; margin: 20px 0 8px; }
.article-body p { margin: 0 0 12px; line-height: 1.75; }
.article-body ul { padding-left: 20px; line-height: 1.9; margin: 0 0 12px; }
.featured { position: relative; overflow: hidden; border-radius: 22px; background: linear-gradient(115deg, #fff 0%, #ffeef3 60%, #ffe3ec 100%); padding: 28px; min-height: 250px; display: flex; align-items: center; border: 1px solid var(--line); cursor: pointer; }
.featured img { position: absolute; right: 20px; bottom: 0; height: 95%; mix-blend-mode: multiply; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20%); mask-image: linear-gradient(to right, transparent 0, #000 20%); }
.featured .txt { max-width: 55%; position: relative; z-index: 2; }
.featured h2 { font-size: 26px; line-height: 1.25; margin: 12px 0 10px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, #ffe1eb 0, transparent 40%), radial-gradient(circle at 90% 90%, #d6f1ec 0, transparent 40%), var(--bg); }
.login-card { max-width: 920px; width: 100%; background: #fff; border-radius: 28px; box-shadow: 0 30px 80px rgba(232, 69, 122, .15); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.login-l { padding: 44px; }
.login-r { background: linear-gradient(160deg, #fff5f8, #ffe3ec); position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 440px; }
.login-r img { width: 88%; mix-blend-mode: multiply; }
.login-r .script { position: absolute; top: 40px; left: 36px; font-size: 28px; transform: rotate(-5deg); }
.role { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); margin-top: 14px; width: 100%; text-align: left; transition: .15s; }
.role:hover { border-color: var(--pink-400); background: var(--pink-50); transform: translateY(-1px); }
.demo-note { margin-top: 18px; font-size: 12px; color: var(--muted); background: var(--soft); border-radius: 12px; padding: 10px 12px; }

.more-sheet { position: fixed; inset: 0; z-index: 90; background: rgba(29, 38, 87, .3); display: flex; align-items: flex-end; }
.more-sheet .sheet { background: #fff; width: 100%; border-radius: 24px 24px 0 0; padding: 18px 16px 30px; animation: up .2s; }
@keyframes up { from { transform: translateY(100%); } }
.more-sheet a, .more-sheet button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 10px; border-radius: 12px; font-weight: 500; text-align: left; }
.more-sheet a:hover, .more-sheet button:hover { background: var(--pink-50); }

.bar-h { height: 10px; border-radius: 999px; background: var(--gray-100); overflow: hidden; }
.bar-h > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pink-400), var(--pink)); }

.mobile-only { display: none; }

/* ---------- Đợt 1: biểu đồ, cột mốc, bot, thư giãn ---------- */
.jchart { width: 100%; height: auto; display: block; }
.jchart .axis { stroke: var(--line); stroke-width: 1; }
.jchart .lbl { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.jchart .val { font-size: 10.5px; fill: var(--ink); font-weight: 600; font-family: var(--font); }
.jchart .lineF { fill: none; stroke: var(--pink); stroke-width: 2.5; stroke-linejoin: round; }
.jchart .lineE { fill: none; stroke: var(--mint); stroke-width: 2; stroke-dasharray: 4 3; }
.jchart .dotF { fill: #fff; stroke: var(--pink); stroke-width: 2.5; }
.jchart .dotF.best { fill: var(--pink); }
.jchart .dotE { fill: #fff; stroke: var(--mint); stroke-width: 2; }
.jchart .band.b1 { fill: #fff7fa; }
.jchart .band.b2 { fill: var(--mint-50); }
.jchart .lbl.cyl { font-size: 10px; fill: var(--muted); font-weight: 600; letter-spacing: .3px; }
.jchart .valE { font-size: 9.5px; fill: #1f9c86; font-weight: 600; font-family: var(--font); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge { text-align: center; padding: 12px 6px; border-radius: 14px; background: var(--soft); border: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }
.badge .ic { margin: 0 auto 6px; }
.badge.on { background: linear-gradient(160deg, #fff, #ffeef3); border: 1px solid var(--pink-100); color: var(--ink); font-weight: 600; }
.badge.on .ic { background: var(--pink); color: #fff; }
.streak-days { display: flex; gap: 4px; }
.streak-days span { flex: 1; height: 8px; border-radius: 4px; background: var(--gray-100); }
.streak-days span.on { background: var(--pink); }
.bot { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 6px 4px; }
.bot .bubble { max-width: 88%; }
.bot .bubble.bot { align-self: flex-start; background: var(--pink-50); color: var(--ink); border-bottom-left-radius: 4px; }
.bot .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bot .opts button { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--pink-100); color: var(--pink); font-weight: 500; font-size: 12.5px; }
.bot .opts button:hover { background: var(--pink); color: #fff; }
.confirm-tbl td { padding: 6px 8px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.confirm-tbl td:first-child { color: var(--muted); width: 130px; }
.flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #fff0f0; color: var(--red); font-size: 11px; font-weight: 600; }
.husband { max-width: 560px; margin: 0 auto; padding: 24px 16px 60px; }
.mini-stat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.mini-stat b { font-size: 18px; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .g5 { grid-template-columns: repeat(3, 1fr); }
  .main-side { grid-template-columns: minmax(0, 1fr) 300px; }
  .hero img.hero-img { right: 150px; }
  .topnav a span { display: none; }
}
@media (max-width: 1080px) {
  .main-side, .main-side-l { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 200px; }
}
@media (max-width: 900px) {
  body { font-size: 14px; }
  .topbar { padding: 0 16px; height: 60px; gap: 10px; }
  .logo img { height: 28px; }
  .topnav, .sidebar, .topsearch, .user-chip .txt, .user-chip > svg { display: none !important; }
  .shell { min-height: calc(100vh - 60px); }
  .content { padding: 16px 16px 100px; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(232, 69, 122, .06); }
  .bottomnav a, .bottomnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
  .bottomnav a.active, .bottomnav button.active { color: var(--pink); font-weight: 600; }
  .bottomnav svg.lucide { width: 22px; height: 22px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .g4, .g5 { grid-template-columns: repeat(2, 1fr); }
  .kpi { padding: 14px; gap: 10px; } .kpi .v { font-size: 22px; } .kpi .ic { width: 38px; height: 38px; }
  .hero { padding: 20px; min-height: 150px; border-radius: 20px; }
  .hero h1 { font-size: 25px; }
  .hero .hero-txt { max-width: 62%; }
  .hero p { font-size: 13px; }
  .hero img.hero-img { right: -10px; max-height: 150px; }
  .hero .hero-script { display: none; }
  .featured { padding: 20px; min-height: 220px; } .featured h2 { font-size: 20px; } .featured .txt { max-width: 62%; } .featured img { right: -20px; height: 80%; }
  .login-card { grid-template-columns: 1fr; } .login-r { display: none; } .login-l { padding: 28px 22px; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; }
  .desk-only { display: none !important; }
  .mobile-only { display: block; }
  .row.mobile-only { display: flex; }
  .topsearch + .top-right { margin-left: auto; }
  .card { padding: 16px; }
  .toast-wrap { top: 70px; left: 16px; right: 16px; }
  .quote-band .script { font-size: 18px; }
  .tbl.stack-m thead { display: none; }
  .tbl.stack-m tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .tbl.stack-m td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 6px; }
  .tbl.stack-m td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12px; }
}
@media (max-width: 420px) {
  .g4, .g5 { grid-template-columns: 1fr 1fr; }
  .hero .hero-txt { max-width: 66%; }
  .hero img.hero-img { opacity: .9; }
}

/* Trình phát bài hát (góc thư giãn) + thanh nhỏ khi chuyển màn */
.player .player-bar { height: 8px; border-radius: 4px; background: var(--gray-100); margin: 12px 0 6px; cursor: pointer; overflow: hidden; }
.player .player-bar > div { height: 100%; background: linear-gradient(90deg, #ffb3c6, var(--pink)); border-radius: 4px; transition: width .25s linear; }
.minibar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 45; width: min(480px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; background: rgba(255, 255, 255, .97); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(232, 69, 122, .18); }
@media (max-width: 900px) { .minibar { bottom: calc(74px + env(safe-area-inset-bottom)); } }

/* Thống kê dùng app: biểu đồ cột */
.ubars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 6px; }
.ubars .ub { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.ubars .ubv { width: 100%; max-width: 26px; min-height: 2px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #ff8fb0, var(--pink)); }
.ubars .ubv.lav { background: linear-gradient(180deg, #b9b2ff, var(--lav)); }
.ubars .ub span { font-size: 9.5px; color: var(--muted); height: 14px; margin-top: 4px; white-space: nowrap; }
.ubars.hours { height: 140px; }

/* Đọc ảnh siêu âm bằng AI */
.ai-read { background: var(--lav-50, #f3f1ff); border: 1px dashed #c9c2ff; border-radius: 14px; padding: 12px 14px; margin: -4px 0 14px; }
.ai-filled { background: #fff6cc !important; box-shadow: inset 0 0 0 1.5px #f5c518; }
.date-vn { font-size: 12px; color: var(--pink-600, #c2185b); margin-top: 4px; min-height: 16px; }
