/* =========================================================
   ONBOARDING V2 — module độc lập, không ghi đè nội dung cũ
========================================================= */
:root {
  --ob-green: #0b5a45;
  --ob-green-dark: #084334;
  --ob-cream: #fffdf7;
  --ob-border: #dce8e2;
  --ob-shadow: 0 18px 55px rgba(20, 45, 38, .18);
}

.ob-hidden { display: none !important; }
body.ob-lock { overflow: hidden !important; }

/* Welcome */
.ob-welcome-layer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 38, 31, .18);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  animation: obFadeIn .18s ease-out;
}
.ob-welcome-card {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 26px;
  padding: 30px 28px 24px;
  background: rgba(255,255,255,.98);
  box-shadow: var(--ob-shadow);
  text-align: center;
  color: #263b35;
  animation: obPop .24s cubic-bezier(.2,.85,.3,1.08);
}
.ob-welcome-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f3;
  color: #52645e;
  font-size: 20px;
  cursor: pointer;
}
.ob-welcome-icon { font-size: 44px; line-height: 1; margin-bottom: 8px; }
.ob-welcome-card h2 { margin: 4px 0 10px; color: var(--ob-green-dark); font-size: 28px; }
.ob-welcome-card > p { margin: 0 auto 22px; max-width: 460px; line-height: 1.55; color: #5f706a; }
.ob-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ob-role-btn {
  min-height: 122px;
  border: 1px solid var(--ob-border);
  border-radius: 18px;
  background: #fbfdfc;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ob-role-btn:hover { transform: translateY(-2px); border-color: #8fc5b4; box-shadow: 0 10px 24px rgba(20,75,59,.10); }
.ob-role-btn .ob-role-icon { display: block; font-size: 34px; margin-bottom: 7px; }
.ob-role-btn strong { display: block; font-size: 18px; color: #173f34; }
.ob-role-btn small { display: block; margin-top: 4px; color: #75847f; }
.ob-today-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin: 19px 0 8px;
  font-size: 14px;
  color: #65746f;
  line-height: 1.35;
  cursor: pointer;
}
.ob-today-row input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  margin: 0;
  padding: 0;
  transform: none !important;
  box-shadow: none !important;
  border-radius: 3px;
  cursor: pointer;
  accent-color: var(--ob-green);
  flex: 0 0 18px;
}
.ob-later-btn { border: 0; background: transparent; color: #65746f; padding: 8px 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Tips — vùng riêng, không đụng activityNotice */
.ob-tab-tip {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 14px;
  padding: 13px 48px 13px 18px;
  border: 1px solid #ead58a;
  border-radius: 16px;
  background: #fffdf2;
  box-shadow: 0 8px 22px rgba(95,76,15,.06);
  color: #5e4d15;
}
.ob-tab-tip strong { display: block; margin-bottom: 2px; color: #59450b; }
.ob-tab-tip span { line-height: 1.45; }
.ob-tip-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #f7edbc;
  color: #806e25;
  cursor: pointer;
}

/* Replay panel */
.ob-replay-panel { margin-top: 18px; }
.ob-replay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ob-replay-actions button { min-width: 170px; }
.ob-tip-state { margin-top: 10px; color: #65746f; font-size: 14px; }

/* Tour */
.ob-tour-layer { position: fixed; inset: 0; z-index: 100010; pointer-events: none; }
.ob-tour-dim { position: absolute; inset: 0; background: rgba(10,32,27,.16); pointer-events: auto; }
.ob-spotlight {
  position: fixed;
  z-index: 100012;
  border: 3px solid rgba(255,255,255,.98);
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(10,32,27,.16), 0 0 0 6px rgba(255,213,64,.65), 0 12px 34px rgba(0,0,0,.18);
  transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease;
  pointer-events: none;
}
.ob-tour-card {
  position: fixed;
  z-index: 100013;
  width: min(390px, calc(100vw - 28px));
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 20px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--ob-shadow);
  color: #263b35;
  pointer-events: auto;
}
.ob-tour-kicker { color: #7b8b85; font-size: 13px; font-weight: 700; }
.ob-tour-card h3 { margin: 7px 0 8px; color: var(--ob-green-dark); font-size: 21px; }
.ob-tour-card p { margin: 0; line-height: 1.55; color: #5c6b66; }
.ob-tour-progress { height: 5px; margin: 16px 0 14px; overflow: hidden; border-radius: 99px; background: #edf2ef; }
.ob-tour-progress > i { display: block; height: 100%; border-radius: inherit; background: var(--ob-green); transition: width .2s ease; }
.ob-tour-actions { display: flex; align-items: center; gap: 8px; }
.ob-tour-actions .ob-skip { margin-right: auto; border: 0; background: transparent; color: #6b7974; cursor: pointer; }
.ob-tour-actions button:not(.ob-skip) { border: 0; border-radius: 11px; padding: 9px 14px; cursor: pointer; font-weight: 700; }
.ob-prev { background: #eef3f1; color: #42544e; }
.ob-next { background: var(--ob-green); color: white; }

@keyframes obFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes obPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 680px) {
  .ob-welcome-layer { padding: 12px; align-items: center; }
  .ob-welcome-card { padding: 26px 18px 20px; border-radius: 22px; }
  .ob-welcome-card h2 { font-size: 23px; }
  .ob-role-grid { grid-template-columns: 1fr; }
  .ob-role-btn { min-height: 92px; }
  .ob-tab-tip { margin-left: 10px; margin-right: 10px; }
  .ob-tour-card { padding: 17px; }
}
