/* PTC Ngày Tốt Xấu – ngaytot.css */
#ptc-ngaytot-wrap { font-family:'Segoe UI',Arial,sans-serif; max-width:900px; margin:0 auto; color:#222; }
.ptc-ngaytot-title { color:#8b0000; border-bottom:2px solid #8b0000; padding-bottom:8px; margin-bottom:16px; font-size:1.4rem; margin-top: 30px}

/* ── Tabs ── */
.ptc-nt-tab-header { display:flex; gap:4px; border-bottom:2px solid #8b0000; margin-bottom:14px; flex-wrap:wrap; }
.ptc-nt-tab { padding:7px 18px; border:1px solid #ddd; border-bottom:none; background:#f5f5f5; cursor:pointer; border-radius:4px 4px 0 0; font-size:.9rem; transition:background .2s; }
.ptc-nt-tab.active,.ptc-nt-tab:hover { background:#8b0000; color:#fff; border-color:#8b0000; }
.ptc-nt-content { display:none; } .ptc-nt-content.active { display:block; }

/* ── Form ── */
.ptc-nt-row { display:flex; align-items:center; margin-bottom:10px; gap:8px; flex-wrap:wrap; }
.ptc-nt-row label:first-child { width:130px; font-weight:600; color:#555; flex-shrink:0; }
.ptc-nt-row select { padding:6px 10px; border:1px solid #ccc; border-radius:4px; font-size:.9rem; }
.ptc-nt-row select:focus { border-color:#8b0000; outline:none; }
.ptc-nt-inline { display:flex; gap:6px; align-items:center }
.ptc-nt-inline select { min-width:75px; }
.ptc-nt-note { font-size:.8rem; color:#888; font-style:italic; }
.ptc-nt-actions { margin-top:16px; }
.ptc-nt-btn-primary { background:#8b0000; color:#fff; border:none; padding:11px 36px; border-radius:6px; font-size:1rem; cursor:pointer; font-weight:600; letter-spacing:.02em; transition:background .2s; }
.ptc-nt-btn-primary:hover { background:#5a0000; }
.ptc-nt-btn-sec { background:#555; color:#fff; border:none; padding:7px 16px; border-radius:5px; font-size:.85rem; cursor:pointer; margin-right:8px; transition:background .2s; }
.ptc-nt-btn-sec:hover { background:#333; }

/* ── Loading ── */
#ptc-ngaytot-loading { text-align:center; padding:36px; color:#8b0000; }
.ptc-nt-spinner { width:48px; height:48px; border:5px solid #f3f3f3; border-top:5px solid #8b0000; border-radius:50%; animation:ntSpin .8s linear infinite; margin:0 auto 12px; }
@keyframes ntSpin { to { transform:rotate(360deg); } }
.ptc-nt-result-actions { margin:12px 0; }

/* ── Result wrapper ── */
#ptc-ngaytot-chart-wrapper { background:#fff; padding:20px; border:2px solid #8b0000; border-radius:8px; }

/* ── Can Chi colors ── */
.nt-can,.nt-chi { font-weight:700; padding:0 1px; }
.nt-duong { color:#c00; }
.nt-am    { color:#1a56c4; }
.nt-moc   { color:#2e7d32; }
.nt-hoa   { color:#c00; }
.nt-tho   { color:#b8860b; }
.nt-kim   { color:#5a5a5a; }
.nt-thuy  { color:#1565c0; }

/* ── Day detail ── */
.nt-day-detail { font-size:.92rem; }
.nt-day-header { background:#fff8f0; border:1px solid #e0c090; border-radius:8px; padding:14px 18px; margin-bottom:14px; }
.nt-day-solar  { font-size:1.25rem; font-weight:700; color:#8b0000; }
.nt-day-lunar  { font-size:.9rem; color:#555; margin-top:4px; }
.nt-day-canchinam { margin-top:8px; font-size:.9rem; color:#333; }
.nt-day-canchinam .nt-can, .nt-day-canchinam .nt-chi { font-size:.95rem; }
.nt-tietki-badge { display:inline-block; margin-top:8px; background:#2e7d32; color:#fff; border-radius:4px; padding:3px 10px; font-size:.8rem; font-weight:600; }

/* ── Score main badge ── */
.nt-score-main { text-align:center; font-size:1.4rem; font-weight:700; padding:12px; border-radius:8px; margin-bottom:14px; }
.nt-score-num  { font-size:.9rem; font-weight:400; }
.nt-score-dacat  { background:#8b0000; color:#fff; }
.nt-score-tot    { background:#2e7d32; color:#fff; }
.nt-score-binh   { background:#f5e8d0; color:#666; }
.nt-score-xau    { background:#e07800; color:#fff; }
.nt-score-dahung { background:#222; color:#fff; }

/* ── Info blocks (Trực, Sao, ...) ── */
.nt-info-block { background:#fff8f0; border:1px solid #e0c090; border-radius:6px; padding:12px 16px; margin-bottom:10px; }
.nt-info-title { font-weight:700; color:#8b0000; margin-bottom:6px; font-size:.95rem; }
.nt-info-body  { color:#333; line-height:1.7; font-size:.88rem; }
.nt-viec-tot   { margin-top:6px; font-size:.82rem; color:#2e7d32; }
.nt-viec-xau   { margin-top:4px; font-size:.82rem; color:#c00; }

/* ── Score table ── */
.nt-score-table { border-collapse:collapse; width:100%; font-size:.85rem; margin-top:8px; }
.nt-score-table th { background:#8b0000; color:#fff; padding:6px 10px; text-align:left; }
.nt-score-table td { border:1px solid #e0c090; padding:6px 10px; }
.nt-score-table tr:nth-child(even) td { background:#fff8f0; }
.nt-score-cell  { text-align:center; width:90px; }
.nt-score-detail { color:#666; font-size:.78rem; }
.nt-score-badge { display:inline-block; padding:2px 8px; border-radius:4px; font-size:.78rem; font-weight:600; color:#fff; }
.nt-score-badge.nt-score-dacat  { background:#8b0000; }
.nt-score-badge.nt-score-tot    { background:#2e7d32; }
.nt-score-badge.nt-score-binh   { background:#999; }
.nt-score-badge.nt-score-xau    { background:#e07800; }
.nt-score-badge.nt-score-dahung { background:#333; }
/* Score row backgrounds in table */
.nt-score-dacat-row td  { background:#fff0f0 !important; }
.nt-score-dahung-row td { background:#f5f5f5 !important; }

/* ── Giờ table ── */
.nt-gio-table { border-collapse:collapse; width:100%; font-size:.85rem; margin-top:8px; }
.nt-gio-table th { background:#8b0000; color:#fff; padding:6px 10px; text-align:left; }
.nt-gio-table td { border:1px solid #e0c090; padding:6px 10px; }
.nt-gio-table tr:nth-child(even) td { background:#fff8f0; }
.nt-gio-time   { color:#666; font-size:.8rem; }
.nt-hoangdao-row td { background:#fffde7 !important; }
.nt-hackdao-row  td { background:#fafafa !important; }
.nt-hd-badge       { display:inline-block; padding:2px 8px; border-radius:4px; font-size:.78rem; font-weight:600; }
.nt-hoangdao       { background:#fbc02d; color:#333; }
.nt-hackdao        { background:#616161; color:#fff; }

/* ── Calendar grid ── */
.nt-calendar    { font-size:.88rem; }
.nt-cal-title   { font-size:1.1rem; font-weight:700; color:#8b0000; margin-bottom:10px; text-align:center; }
.nt-cal-grid    { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.nt-cal-head    { text-align:center; font-weight:600; background:#8b0000; color:#fff; padding:5px 2px; font-size:.8rem; border-radius:3px; }
.nt-cal-empty   { background:#f9f9f9; border-radius:4px; min-height:72px; }
.nt-cal-cell    { border-radius:4px; padding:5px 4px; cursor:pointer; min-height:72px; transition:opacity .15s; border:1px solid #e0e0e0; }
.nt-cal-cell:hover { opacity:.85; border-color:#8b0000; }
.nt-cal-solar   { font-size:1rem; font-weight:700; }
.nt-cal-lunar   { font-size:.7rem; color:#888; }
.nt-cal-score-dot { margin-top:3px; }
.nt-cal-score-dot .nt-score-badge { font-size:.65rem; padding:1px 5px; }
.nt-cal-tiet    { font-size:.65rem; color:#2e7d32; font-weight:600; margin-top:2px; }

/* Calendar cell colors */
.nt-score-dacat-cal  { background:#ffeaea; }
.nt-score-tot-cal    { background:#e8f5e9; }
.nt-score-binh-cal   { background:#fafafa; }
.nt-score-xau-cal    { background:#fff3e0; }
.nt-score-dahung-cal { background:#f0f0f0; }

/* ── Hướng dẫn ── */
.nt-huongdan-box { padding:14px 18px; background:#fff8f0; border:1px solid #e0c090; border-radius:8px; line-height:1.85; font-size:.88rem; color:#333; max-width:700px; }
.nt-huongdan-box h3 { color:#8b0000; margin:12px 0 6px; }
.nt-huongdan-box table { border-collapse:collapse; font-size:.82rem; margin:8px 0; width:100%; max-width:560px; }
.nt-huongdan-box th { background:#8b0000; color:#fff; padding:5px 10px; }
.nt-huongdan-box td { border:1px solid #c0a060; padding:5px 10px; }
.nt-huongdan-box tr:nth-child(even) td { background:#fff8f0; }

/* ── Responsive ── */
@media(max-width:640px) {
  .nt-cal-grid { gap:2px; }
  .nt-cal-cell { min-height:56px; padding:3px 2px; }
  .nt-cal-solar { font-size:.88rem; }
  .nt-cal-lunar { font-size:.62rem; }
  .nt-score-table,.nt-gio-table { font-size:.78rem; }
  .ptc-nt-row label:first-child { width:100px; }
  .nt-score-detail { display:none; }
}
