/* HVPBridge — Cổng phụ huynh — tông rose/coral (khác cổng HS sky) */
:root {
  --pp-sky: #e11d48;
  --pp-teal: #f43f5e;
  --pp-coral: #ea580c;
  --pp-mint: #fb7185;
  --pp-ink: #1c1917;
  --pp-muted: #78716c;
  --pp-cream: #fff1f2;
  --pp-card: rgba(255, 255, 255, 0.94);
  --pp-radius: 1.25rem;
  --pp-shadow: 0 12px 40px rgba(225, 29, 72, 0.12);
  --pp-font: "Nunito", "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --pp-display: "Nunito", "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --pp-weight-display: 800;
  --pp-weight-title: 700;
  --pp-weight-bold: 800;
  --pp-weight-semibold: 700;
}

.pp-body {
  font-family: var(--pp-font);
  color: var(--pp-ink);
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(251, 113, 133, 0.32), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(251, 146, 60, 0.22), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(225, 29, 72, 0.1), transparent 55%),
    linear-gradient(180deg, #ffe4e6 0%, #fafaf9 45%, #fff1f2 100%);
  background-attachment: fixed;
}

/* Bù độ đậm khi dùng Nunito (Tailwind font-bold / strong / tiêu đề) */
.pp-body strong,
.pp-body b,
.pp-body .font-bold,
.pp-login-body strong,
.pp-login-body b,
.pp-login-body .font-bold {
  font-weight: var(--pp-weight-bold) !important;
}
.pp-body .font-semibold,
.pp-login-body .font-semibold {
  font-weight: var(--pp-weight-semibold) !important;
}
.pp-body .font-display,
.pp-login-body .font-display {
  font-family: var(--pp-display);
  font-weight: var(--pp-weight-display);
}

.pp-body .page-header {
  background: transparent !important;
  border: 0 !important;
  padding: 0 0 1rem !important;
  margin-bottom: 0.5rem;
}
.pp-body .page-header h1 {
  font-family: var(--pp-display);
  font-weight: var(--pp-weight-display);
  font-size: 1.65rem;
  color: var(--pp-ink);
  letter-spacing: -0.02em;
}
.pp-body .page-header p {
  color: var(--pp-muted);
  margin-top: 0.25rem;
}

/* —— Nav —— */
.pp-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(225, 29, 72, 0.15);
  box-shadow: 0 4px 24px rgba(225, 29, 72, 0.08);
}
.pp-nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.pp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
  color: var(--pp-ink) !important;
  font-family: var(--pp-display);
  font-weight: var(--pp-weight-display);
  font-size: 1.15rem;
}
.pp-brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  display: block;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.35);
  flex-shrink: 0;
}
.pp-nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
@media (min-width: 768px) {
  .pp-nav-links { display: flex; }
  .pp-nav-toggle { display: none !important; }
}
.pp-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--pp-muted);
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.pp-nav-links a:hover {
  background: rgba(225, 29, 72, 0.1);
  color: var(--pp-sky);
  transform: translateY(-1px);
}
.pp-nav-links a.is-active {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.18), rgba(20, 184, 166, 0.18));
  color: #9f1239;
}
.pp-nav-toggle {
  border: 0;
  background: rgba(225, 29, 72, 0.12);
  color: #9f1239;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  font-size: 1.1rem;
}
.pp-nav-links.is-open {
  display: flex;
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: calc(100% + 0.35rem);
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  padding: 0.75rem;
  border-radius: 1rem;
  box-shadow: var(--pp-shadow);
  border: 1px solid rgba(225, 29, 72, 0.15);
}
.pp-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(225, 29, 72, 0.2);
  background: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--pp-ink);
  cursor: pointer;
}
.pp-user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 11rem;
  background: #fff;
  border-radius: 0.85rem;
  box-shadow: var(--pp-shadow);
  border: 1px solid rgba(225, 29, 72, 0.12);
  padding: 0.35rem;
  z-index: 50;
}
.pp-user-menu.is-open {
  display: block;
}
.pp-user-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  color: var(--pp-ink);
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: var(--pp-weight-semibold);
}
.pp-user-menu a:hover { background: rgba(225, 29, 72, 0.08); }

.pp-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
  position: relative;
}
.pp-flash {
  max-width: 72rem;
  margin: 0.75rem auto 0;
  padding: 0 1rem;
}
.pp-flash .pp-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  font-size: 0.9rem;
  font-weight: var(--pp-weight-semibold);
  margin-bottom: 0.5rem;
  animation: sp-pop 0.35s ease;
}
.pp-alert-success { background: #ffe4e6; color: #9f1239; }
.pp-alert-danger { background: #fee2e2; color: #991b1b; }
.pp-alert-warning { background: #ffedd5; color: #9a3412; }
.pp-alert-info { background: #ffe4e6; color: #9f1239; }

.pp-footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  color: var(--pp-muted);
  font-size: 0.8rem;
}

/* —— Dashboard hero —— */
.pp-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--pp-radius) + 0.25rem);
  padding: 1.5rem 1.5rem 1.35rem;
  margin-bottom: 1.25rem;
  color: #fff;
  background: linear-gradient(125deg, #be123c 0%, #f43f5e 55%, #f97316 130%);
  box-shadow: 0 16px 40px rgba(225, 29, 72, 0.28);
  animation: sp-rise 0.55s ease both;
}
.pp-hero h1 {
  font-family: var(--pp-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: var(--pp-weight-display);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}
.pp-hero p { margin: 0; opacity: 0.92; font-weight: var(--pp-weight-semibold); }
.pp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  font-weight: 700;
}
.pp-hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.25;
  background: #fff;
  animation: sp-float 6s ease-in-out infinite;
}
.pp-hero-orb.a { width: 7rem; height: 7rem; right: -1rem; top: -2rem; }
.pp-hero-orb.b { width: 4rem; height: 4rem; right: 5rem; bottom: -1rem; animation-delay: -2s; }

.pp-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
  .pp-stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.pp-stat {
  background: var(--pp-card);
  border-radius: var(--pp-radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--pp-shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: sp-rise 0.55s ease both;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pp-stat:nth-child(1) { animation-delay: 0.05s; }
.pp-stat:nth-child(2) { animation-delay: 0.1s; }
.pp-stat:nth-child(3) { animation-delay: 0.15s; }
.pp-stat:nth-child(4) { animation-delay: 0.2s; }
.pp-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(225, 29, 72, 0.18);
}
.pp-stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 0.65rem;
  font-size: 1rem;
}
.pp-stat-icon.sky { background: linear-gradient(135deg, #38bdf8, #be123c); }
.pp-stat-icon.mint { background: linear-gradient(135deg, #fda4af, #e11d48); }
.pp-stat-icon.coral { background: linear-gradient(135deg, #fb923c, #ea580c); }
.pp-stat-icon.rose { background: linear-gradient(135deg, #fb7185, #e11d48); }
.pp-stat strong {
  display: block;
  font-family: var(--pp-display);
  font-size: 1.65rem;
  font-weight: var(--pp-weight-display);
  line-height: 1.1;
  color: var(--pp-ink);
}
.pp-stat span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pp-muted);
}

.pp-panel {
  background: var(--pp-card);
  border-radius: var(--pp-radius);
  box-shadow: var(--pp-shadow);
  border: 1px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
  margin-bottom: 1rem;
  animation: sp-rise 0.55s ease both;
}
.pp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(225, 29, 72, 0.1);
  font-family: var(--pp-display);
  font-weight: var(--pp-weight-title);
  font-size: 1.05rem;
}
.pp-panel-body { padding: 1rem 1.1rem; }

.pp-quick {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
.pp-quick a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  text-decoration: none !important;
  font-weight: 700;
  color: var(--pp-ink);
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.08), rgba(20, 184, 166, 0.06));
  border: 1px solid rgba(225, 29, 72, 0.12);
  transition: transform 0.15s, background 0.2s;
}
.pp-quick a:hover {
  transform: translateX(4px);
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.14), rgba(249, 115, 22, 0.08));
}
.pp-quick-ico {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.pp-quick-ico.lms { background: linear-gradient(135deg, #38bdf8, #6366f1); }
.pp-quick-ico.counsel { background: linear-gradient(135deg, #2dd4bf, #f43f5e); }
.pp-quick-ico.eval { background: linear-gradient(135deg, #fb923c, #f43f5e); }
.pp-quick-ico.attend { background: linear-gradient(135deg, #14b8a6, #0ea5e9); }

.pp-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
}
.pp-chip-orange { background: #f97316; }
.pp-chip-red { background: #ef4444; }
.pp-chip-cyan { background: #06b6d4; }
.pp-chip-green { background: #f43f5e; }
.pp-score {
  display: inline-flex;
  min-width: 2.5rem;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #fb7185, #e11d48);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

/* Soften legacy hv-card inside student shell */
.pp-body .hv-card {
  border-radius: var(--pp-radius) !important;
  box-shadow: var(--pp-shadow) !important;
  border: 1px solid rgba(225, 29, 72, 0.1) !important;
  overflow: hidden;
}
.pp-body .hv-card-header,
.pp-body .hv-stat-card {
  font-family: var(--pp-display);
}
.pp-body .btn-primary {
  background: linear-gradient(135deg, var(--pp-sky), var(--pp-teal)) !important;
  border: 0 !important;
  font-weight: 800 !important;
  border-radius: 0.85rem !important;
}
.pp-body .hv-table th {
  font-size: 0.7rem !important;
  letter-spacing: 0.04em;
  font-weight: var(--pp-weight-title);
}

/* —— Login —— */
.pp-login-body {
  box-sizing: border-box;
  margin: 0;
  font-family: var(--pp-font);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vh, 1.5rem) clamp(0.75rem, 3vw, 1.5rem);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(251, 113, 133, 0.45), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(251, 146, 60, 0.35), transparent 35%),
    radial-gradient(circle at 70% 80%, rgba(225, 29, 72, 0.28), transparent 40%),
    linear-gradient(160deg, #9f1239 0%, #e11d48 50%, #c2410c 120%);
}
.pp-login-body *,
.pp-login-body *::before,
.pp-login-body *::after {
  box-sizing: border-box;
}
.pp-login-wrap {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}
.pp-login-card {
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  animation: sp-rise 0.5s ease both;
}
.pp-login-top {
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1rem, 4vw, 1.75rem) clamp(1rem, 3vw, 1.5rem);
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #be123c, #e11d48 55%, #ea580c);
  position: relative;
  overflow: hidden;
}
.pp-login-top h1 {
  font-family: var(--pp-display);
  font-size: clamp(1.2rem, 4.5vw, 1.65rem);
  font-weight: var(--pp-weight-display);
  margin: 0.75rem 0 0.35rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.pp-login-top p {
  margin: 0;
  opacity: 0.92;
  font-weight: var(--pp-weight-semibold);
  font-size: clamp(0.8rem, 2.8vw, 0.9rem);
  line-height: 1.4;
  padding: 0 0.15rem;
}
.pp-login-mascot {
  width: clamp(3.5rem, 12vw, 4.5rem);
  height: clamp(3.5rem, 12vw, 4.5rem);
  margin: 0 auto;
  border-radius: 1.25rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  font-size: clamp(1.5rem, 5vw, 2rem);
  animation: sp-float 4s ease-in-out infinite;
}
.pp-login-logo {
  width: clamp(4.25rem, 16vw, 5.5rem);
  height: clamp(4.25rem, 16vw, 5.5rem);
  margin: 0 auto;
  border-radius: 1.25rem;
  display: block;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(225, 29, 72, 0.35);
  animation: sp-float 4s ease-in-out infinite;
}
.pp-login-body-inner {
  padding: clamp(1rem, 3.5vw, 1.5rem) clamp(1rem, 4vw, 1.75rem) clamp(0.85rem, 3vw, 1.25rem);
}
.pp-ms-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 0;
  background: linear-gradient(135deg, #be123c, #f43f5e);
  color: #fff !important;
  font-weight: 800;
  font-size: clamp(0.9rem, 3.2vw, 1rem);
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}
.pp-ms-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(225, 29, 72, 0.4);
  color: #fff !important;
}
.pp-login-warn {
  margin: 0;
  font-size: 0.875rem;
  color: #b91c1c;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}
.pp-login-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  text-align: center;
  color: #64748b;
  font-weight: 600;
  line-height: 1.45;
}
.pp-login-foot {
  padding: 0.85rem 1.25rem;
  background: #f8fafc;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}
.pp-login-links {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.85rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.pp-login-links a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  margin: 0;
  white-space: nowrap;
}
.pp-login-links a:hover { text-decoration: underline; }

/* Màn hình hẹp / laptop nhỏ */
@media (max-width: 480px) {
  .pp-login-card { border-radius: 1.15rem; }
  .pp-ms-btn { white-space: normal; }
}
/* Chiều cao thấp (laptop 1366×768, cửa sổ ngắn) */
@media (max-height: 700px) {
  .pp-login-body {
    align-items: flex-start;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .pp-login-mascot,
  .pp-login-logo {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.35rem;
    animation: none;
  }
  .pp-login-top { padding-top: 1.1rem; padding-bottom: 1rem; }
  .pp-login-top h1 { margin-top: 0.5rem; font-size: 1.25rem; }
  .pp-login-body-inner { padding-top: 1rem; padding-bottom: 0.85rem; }
}

@keyframes sp-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes sp-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .pp-hero, .pp-stat, .pp-panel, .pp-login-card,
  .pp-hero-orb, .pp-login-mascot, .pp-login-logo, .pp-flash .pp-alert {
    animation: none !important;
  }
}

/* —— Nhìn lại quá trình (đồng bộ sky–teal với sp-panel / nav) —— */
.pp-body .rv-wrap {
  --rv-ink: #0c4a6e;          /* sky-900 — chữ tiêu đề/nhãn */
  --rv-muted: #9f1239;        /* sky-700 — gợi ý, phụ */
  --rv-border: rgba(225, 29, 72, 0.28);
  --rv-border-soft: rgba(225, 29, 72, 0.14);
  --rv-fill: rgba(240, 249, 255, 0.95);
  max-width: 42rem;
  margin: 0 auto;
  color: var(--rv-ink);
}
.pp-body .rv-form-shell {
  background: var(--pp-card);
  border-radius: var(--pp-radius);
  box-shadow: var(--pp-shadow);
  border: 1px solid var(--rv-border) !important;
  padding: 1.15rem 1.15rem 1.35rem;
  animation: sp-rise 0.45s ease both;
  color: var(--rv-ink);
}
.pp-body .rv-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.12);
  overflow: hidden;
  margin-bottom: 1rem;
}
.pp-body .rv-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pp-sky), var(--pp-teal));
  transition: width 0.35s ease;
}
.pp-body .rv-step-index {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pp-teal) !important;
}
.pp-body .rv-step-title {
  margin: 0.2rem 0 0.15rem;
  font-family: var(--pp-display);
  font-size: 1.35rem;
  font-weight: var(--pp-weight-display);
  color: var(--rv-ink) !important;
}
.pp-body .rv-step-hint {
  margin: 0 0 0.9rem;
  color: var(--rv-muted) !important;
  font-size: 0.92rem;
  opacity: 0.85;
}
.pp-body .rv-dots {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}
.pp-body .rv-dots button {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(225, 29, 72, 0.22);
  transition: transform 0.15s, background 0.15s;
}
.pp-body .rv-dots button.active {
  background: var(--pp-sky);
  transform: scale(1.25);
}
.pp-body .rv-dots button.done {
  background: var(--pp-teal);
}
.pp-body .rv-step { display: none; }
.pp-body .rv-step.active {
  display: grid;
  gap: 0.95rem;
  animation: sp-rise 0.3s ease;
}
.pp-body .rv-field { display: grid; gap: 0.3rem; }
.pp-body .rv-field-label {
  font-weight: 700;
  color: var(--rv-ink) !important;
  font-size: 0.92rem;
}
.pp-body .rv-field-hint {
  font-size: 0.8rem;
  color: var(--rv-muted) !important;
  opacity: 0.8;
}
/* Ô nhập: viền sky (không dùng xám slate / primary theme) */
.pp-body .rv-form-shell input,
.pp-body .rv-form-shell textarea,
.pp-body .rv-form-shell select {
  width: 100%;
  border: 1.5px solid var(--rv-border) !important;
  border-radius: 0.75rem !important;
  background: #fff !important;
  color: var(--pp-ink) !important;
  font: inherit;
  padding: 0.7rem 0.85rem !important;
  outline: none;
  box-shadow: 0 1px 2px rgba(225, 29, 72, 0.06);
  transition: border-color 0.15s, box-shadow 0.15s;
  caret-color: var(--pp-sky);
}
.pp-body .rv-form-shell input:focus,
.pp-body .rv-form-shell textarea:focus,
.pp-body .rv-form-shell select:focus {
  border-color: var(--pp-sky) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2) !important;
}
.pp-body .rv-form-shell input:disabled {
  background: var(--rv-fill) !important;
  color: var(--rv-muted) !important;
  border-color: var(--rv-border-soft) !important;
  cursor: not-allowed;
  opacity: 1;
}
.pp-body .rv-form-shell input::placeholder,
.pp-body .rv-form-shell textarea::placeholder {
  color: #7dd3fc !important;
  opacity: 1;
}
.pp-body .rv-subject {
  border: 1.5px solid var(--rv-border) !important;
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--rv-fill), #fff) !important;
  padding: 0.9rem 1rem;
}
.pp-body .rv-subject h3 {
  margin: 0 0 0.7rem;
  font-family: var(--pp-display);
  font-weight: var(--pp-weight-title);
  color: #9f1239 !important;
  font-size: 1.05rem;
}
.pp-body .rv-subject-grid { display: grid; gap: 0.75rem; }
@media (min-width: 720px) {
  .pp-body .rv-subject-grid { grid-template-columns: 1fr 1fr; }
}
.pp-body .rv-error {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(249, 115, 22, 0.35);
  background: rgba(255, 247, 237, 0.95);
  color: #c2410c !important;
  font-weight: 700;
  font-size: 0.9rem;
}
.pp-body .rv-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--rv-border-soft);
}
.pp-body .rv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-family: var(--pp-font);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.pp-body .rv-btn:hover { transform: translateY(-1px); }
.pp-body .rv-btn-primary {
  background: linear-gradient(135deg, var(--pp-sky), #be123c) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.28);
}
.pp-body .rv-btn-accent {
  background: linear-gradient(135deg, var(--pp-teal), #f43f5e) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(20, 184, 166, 0.28);
}
.pp-body .rv-btn-ghost {
  background: rgba(225, 29, 72, 0.1) !important;
  color: #9f1239 !important;
  border: 1px solid var(--rv-border) !important;
}
.pp-body .rv-btn-ghost:hover {
  background: rgba(225, 29, 72, 0.18) !important;
}
.pp-body .rv-done {
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: var(--pp-radius);
  background: linear-gradient(180deg, #f0fdfa, #fff);
  box-shadow: var(--pp-shadow);
  padding: 1.25rem;
  text-align: center;
}
.pp-body .rv-done h3 {
  font-family: var(--pp-display);
  font-weight: var(--pp-weight-display);
  color: #e11d48 !important;
  margin: 0 0 0.5rem;
}
.pp-body .rv-form-shell .hidden,
.pp-body .rv-actions .hidden,
.pp-body .rv-error.hidden { display: none !important; }

/* Legacy hero/tips */
.pp-body .rv-hero {
  border: 1px solid var(--rv-border);
  border-radius: var(--pp-radius);
  background: var(--pp-card);
  box-shadow: var(--pp-shadow);
  padding: 1.25rem 1.15rem;
  margin-bottom: 1rem;
}
.pp-body .rv-hero h2 {
  font-family: var(--pp-display);
  font-size: 1.35rem;
  font-weight: var(--pp-weight-display);
  color: var(--rv-ink) !important;
  margin: 0.25rem 0 0.35rem;
}
.pp-body .rv-hero p { color: var(--rv-muted); margin: 0; }
.pp-body .rv-brand { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.pp-body .rv-brand-badge {
  width: 2.2rem; height: 2.2rem; border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--pp-sky), var(--pp-teal));
  color: #fff; font-family: var(--pp-display); font-weight: 800;
  display: grid; place-items: center; font-size: 0.85rem;
}
.pp-body .rv-brand-text { font-family: var(--pp-display); font-weight: var(--pp-weight-title); color: #9f1239 !important; }

/* Link phụ trên form SSA */
.pp-body .rv-wrap a {
  color: #be123c !important;
}
.pp-body .rv-wrap a:hover {
  color: var(--pp-teal) !important;
}

/* Mục tiêu rèn luyện */
.pg-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.pg-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none !important;
  color: #e11d48 !important;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(13, 148, 136, 0.22);
}
.pg-tab.is-active {
  color: #fff !important;
  background: linear-gradient(135deg, #0ea5e9, #f43f5e);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.28);
}
.pg-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
@media (max-width: 640px) {
  .pg-cat-grid { grid-template-columns: 1fr; }
}
.pg-cat {
  cursor: pointer;
}
.pg-cat input { position: absolute; opacity: 0; pointer-events: none; }
.pg-cat span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.4rem;
  padding: 0.7rem 0.5rem;
  border-radius: 1rem;
  border: 2px solid rgba(225, 29, 72, 0.18);
  background: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  color: #0f172a;
  text-align: center;
}
.pg-cat span i { color: #0ea5e9; font-size: 1.1rem; }
.pg-cat input:checked + span {
  border-color: #f43f5e;
  background: #fff1f2;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.pg-goal {
  border: 1px solid rgba(225, 29, 72, 0.14);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  background: #fff;
}
.pg-goal.is-done { opacity: 0.82; background: #f8fafc; }
.pg-badge {
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.pg-badge-active { background: #fff1f2; color: #e11d48; }
.pg-badge-done { background: #ffe4e6; color: #9f1239; }
.pg-dl { display: grid; gap: 0.55rem; margin: 0; }
.pg-dl dt {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.pg-dl dd { margin: 0.15rem 0 0; font-weight: 600; color: #0f172a; white-space: pre-wrap; }
.pg-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  margin: 0 0 0.75rem;
  overflow: hidden;
}
.pg-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #f43f5e);
  border-radius: inherit;
}
.pg-progress-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.85rem;
}
.pg-progress-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.pg-step input { position: absolute; opacity: 0; pointer-events: none; }
.pg-step span {
  display: inline-block;
  min-width: 4.4rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.7rem;
  border: 1px solid #bae6fd;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}
.pg-step span small { font-weight: 600; color: #64748b; }
.pg-step input:checked + span {
  background: #fff1f2;
  border-color: #f43f5e;
  color: #e11d48;
}
.pg-step-btn {
  border: 1px solid #bae6fd;
  background: #fff;
  color: #e11d48;
  font-weight: 800;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  cursor: pointer;
}
.pg-step-btn.is-on {
  background: #f43f5e;
  border-color: #f43f5e;
  color: #fff;
}
.pg-notes-form { margin: 0; }
.pg-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 0.75rem;
  background: #f0fdfa;
  border-bottom: 1px solid #ccfbf1;
}
.pg-table-toolbar--bottom {
  border-bottom: 0;
  border-top: 1px solid #ccfbf1;
}
.pg-table-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}
.pg-batch-save { white-space: nowrap; }
.pg-goals-table { min-width: 680px; }
.pg-goals-table th,
.pg-goals-table td {
  vertical-align: top;
  padding: 0.4rem 0.5rem;
}
.pg-goals-table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  white-space: nowrap;
  padding: 0.35rem 0.5rem;
}
.pg-goals-table tr.is-done { background: #f8fafc; opacity: 0.92; }
.pg-goals-table tr.is-tried { background: #fffbeb; }
.pg-col-stt { width: 2.4rem; text-align: center; font-weight: 800; color: #64748b; }
.pg-col-title { min-width: 11rem; max-width: 16rem; }
.pg-col-date { width: 6.5rem; }
.pg-col-status { width: 10.5rem; }
.pg-col-note { min-width: 10rem; }
.pg-goal-title-row {
  display: inline;
}
.pg-goal-title {
  font-weight: 700;
  color: #0f172a;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
  font-size: 0.9rem;
}
.pg-hist-btn {
  display: inline;
  margin: 0 0 0 0.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  line-height: inherit;
  font-size: 0.7rem;
  vertical-align: baseline;
}
.pg-hist-btn:hover {
  color: #f43f5e;
  background: transparent;
}
.pg-goal-meta {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
}
.pg-goal-meta a { color: #be123c; font-weight: 700; }
.pg-link-danger {
  font: inherit;
  font-weight: 700;
  color: #e11d48;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.pg-status-select { width: 100%; min-width: 8rem; font-size: 0.8rem; padding: 0.25rem 0.4rem; }
.pg-note-input {
  width: 100%;
  min-height: 2.6rem;
  resize: vertical;
  border: 1px solid #bae6fd;
  border-radius: 0.5rem;
  padding: 0.3rem 0.4rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  white-space: pre-wrap;
}
.pg-note-input:focus {
  outline: none;
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Modal lịch sử nhập */
.pg-hist-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pg-hist-modal.hidden { display: none; }
.pg-hist-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.pg-hist-dialog {
  position: relative;
  z-index: 1;
  width: min(36rem, 100%);
  max-height: min(80vh, 40rem);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.85rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}
.pg-hist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.pg-hist-body {
  padding: 0.75rem 1rem 1rem;
  overflow-y: auto;
}
.pg-hist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.pg-hist-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.55rem 0.7rem;
  background: #f8fafc;
}
.pg-hist-meta {
  font-size: 0.7rem;
  font-weight: 800;
  color: #f43f5e;
  margin-bottom: 0.35rem;
}
.pg-hist-field span {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 0.15rem;
}
.pg-hist-field p {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  white-space: pre-wrap;
  line-height: 1.35;
}
.pg-hist-field:last-child p { margin-bottom: 0; }
