/* ==========================================================================
   MODULE TIỆN ÍCH LỊCH: TÌM NGÀY TỐT, ĐỔI NGÀY ÂM DƯƠNG, CÂN XƯƠNG TÍNH SỐ
   ========================================================================== */

.lv-tool-wrap {
  background: #ffffff;
  border: 1px solid #e2ece3;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(18, 59, 50, 0.05);
  margin-bottom: 30px;
  font-family: inherit;
}

.lv-tool-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 28px;
}

.lv-tool-badge {
  display: inline-block;
  padding: 5px 14px;
  background: #fbf7ee;
  border: 1px solid #fae4b5;
  color: #8c6418;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.8px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.lv-tool-header h3 {
  font-size: 26px;
  color: #123b32;
  margin: 0 0 8px;
  font-weight: 800;
}

.lv-tool-header p {
  color: #627267;
  font-size: 15px;
  margin: 0;
  line-height: 1.55;
}

/* FORMS */
.lv-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  background: #f8faf8;
  border: 1px solid #e7efe8;
  padding: 22px;
  border-radius: 18px;
}

.lv-form-group {
  display: flex;
  flex-direction: column;
}

.lv-form-group label {
  font-size: 14px;
  font-weight: 650;
  color: #274033;
  margin-bottom: 6px;
}

.lv-form-group .req {
  color: #b74b42;
}

.lv-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cfded1;
  border-radius: 10px;
  background: #ffffff;
  font-size: 14.5px;
  color: #123b32;
  transition: all 0.2s ease;
  font-family: inherit;
}

.lv-input:focus {
  outline: none;
  border-color: #1b4332;
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12);
}

.lv-form-action {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 8px;
}

.lv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.lv-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.lv-btn-primary {
  background: linear-gradient(135deg, #1b4332 0%, #112d22 100%);
  color: #ffffff;
}

.lv-btn-gold {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: #1a1a1a;
  border: 1px solid #ebd382;
}

/* TABS CHO BỘ ĐỔI NGÀY */
.lv-tab-switch {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.lv-subtab {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid #cfded1;
  background: #f8faf8;
  color: #4b6354;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lv-subtab.active {
  background: #1b4332;
  color: #ffffff;
  border-color: #1b4332;
  box-shadow: 0 4px 10px rgba(27, 67, 50, 0.2);
}

.lv-form-converter {
  background: #f8faf8;
  border: 1px solid #e7efe8;
  padding: 22px;
  border-radius: 18px;
}

.lv-inputs-inline {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.lv-inputs-inline .lv-form-group {
  flex: 1;
  min-width: 100px;
}

.lv-inputs-inline .lv-form-group-btn {
  flex-shrink: 0;
}

.lv-inputs-inline .lv-form-group-check {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.lv-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  color: #274033;
  font-weight: 600;
  cursor: pointer;
}

/* RADIO GROUP CÂN XƯƠNG */
.lv-radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.lv-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 500;
  color: #2c4436;
}

/* ==========================================================================
   RESULT WRAPPERS & CARDS
   ========================================================================== */

.lv-result-wrap, .lv-result-box {
  margin-top: 30px;
  animation: fadeIn 0.3s ease-out;
}

.lv-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9f0ea;
}

.lv-result-header h4 {
  margin: 0;
  font-size: 20px;
  color: #123b32;
  font-weight: 800;
}

.lv-result-count {
  background: #eef5ee;
  color: #1b4332;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

/* CARDS GRID TÌM NGÀY TỐT */
.lv-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.lv-day-card {
  background: #ffffff;
  border: 1px solid #e2ede3;
  border-radius: 18px;
  padding: 18px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02);
}

.lv-day-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(18, 59, 50, 0.08);
}

/* Phân cấp bậc màu sắc viền card tinh tế, đồng đều 4 phía */
.lv-day-card.card-cat-nhat {
  border: 1px solid #b7dfc4;
  background: #ffffff;
}

.lv-day-card.card-cat-nhat:hover {
  border-color: #2e7d56;
}

.lv-day-card.card-dai-cat {
  border: 1.5px solid #d4af37;
  background: #fffefb;
}

.lv-day-card.card-dai-cat:hover {
  border-color: #b8860b;
}

.lv-day-card-top {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.lv-day-seal {
  width: 68px;
  height: 76px;
  background: #1b4332;
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(27, 67, 50, 0.2);
}

.lv-day-seal .solar-d {
  font-size: 30px;
  font-weight: 850;
  line-height: 1;
}

.lv-day-seal .solar-w {
  font-size: 12px;
  color: #fae4b5;
  font-weight: 700;
  margin-top: 2px;
  text-transform: uppercase;
}

.lv-day-info {
  flex: 1;
}

.lv-day-badge-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.lv-badge-cat {
  padding: 3px 10px;
  background: #fbf7ee;
  border: 1px solid #fae4b5;
  color: #8c6418;
  font-size: 13.5px;
  font-weight: 750;
  border-radius: 6px;
}
.lv-badge-cat.badge-dai-cat {
  background: #fff9ea;
  border: 1px solid #e8ca77;
  color: #8c6418;
}
.lv-badge-cat.badge-cat-nhat {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.lv-stars {
  color: #e59819;
  font-size: 14px;
}

.lv-lunar-title {
  font-size: 16px;
  font-weight: 750;
  color: #123b32;
  margin: 0;
}

.lv-canchi-sub {
  font-size: 14px;
  color: #68796e;
  margin: 2px 0 0;
}

.lv-day-lucdieu {
  background: #f5f8f5;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  color: #274033;
  margin-bottom: 10px;
  line-height: 1.5;
}

.lv-day-lucdieu strong {
  color: #059669;
}

.lv-day-hours {
  font-size: 14px;
  margin-bottom: 8px;
}

.lv-day-hours-label {
  font-weight: 700;
  color: #7d5b12;
  margin-bottom: 4px;
}

.lv-hours-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lv-hours-chips span {
  background: #fff;
  border: 1px solid #e5dccb;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 13.5px;
  color: #334155;
  font-weight: 550;
}

.lv-day-huong {
  font-size: 14px;
  color: #55685d;
  border-top: 1px dashed #e1eae1;
  padding-top: 8px;
  margin-top: 8px;
}

/* ==========================================================================
   RESULT BOX ĐỔI NGÀY
   ========================================================================== */

.lv-converter-card {
  background: linear-gradient(135deg, #fbfdfb 0%, #f4f8f4 100%);
  border: 1px solid #cfe0d1;
  border-radius: 18px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.lv-conv-side {
  background: #ffffff;
  border: 1px solid #e1ebe2;
  border-radius: 14px;
  padding: 18px;
}

.lv-conv-side.side-gold {
  border-color: #fae4b5;
  background: #fffdf8;
}

.lv-conv-side h5 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #55685d;
}

.lv-conv-big-date {
  font-size: 24px;
  font-weight: 800;
  color: #123b32;
  margin-bottom: 6px;
}

.lv-conv-sub {
  font-size: 14.5px;
  color: #3b5043;
  line-height: 1.55;
}

/* ==========================================================================
   RESULT BOX CÂN XƯƠNG TÍNH SỐ
   ========================================================================== */

.lv-canxuong-card {
  background: #fffdf9;
  border: 2px solid #ecd89e;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(184, 134, 11, 0.08);
}

.lv-cx-header {
  text-align: center;
  border-bottom: 1px dashed #ecd89e;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.lv-cx-total-weight {
  font-size: 36px;
  font-weight: 850;
  color: #8c6418;
  margin: 8px 0 4px;
  font-family: inherit;
  text-shadow: 0 1px 2px rgba(140, 100, 24, 0.1);
}

.lv-cx-title {
  font-size: 18px;
  font-weight: 750;
  color: #123b32;
  margin: 0;
}

.lv-cx-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.lv-cx-item {
  background: #ffffff;
  border: 1px solid #fae4b5;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.lv-cx-item-label {
  font-size: 14px;
  color: #5d6d63;
  font-weight: 600;
}

.lv-cx-item-val {
  font-size: 15px;
  font-weight: 750;
  color: #8c6418;
  margin-top: 4px;
}

/* BÀI THƠ TỨ TUYỆT PHONG CÁCH HOÀNG GIA */
.lv-cx-poem-box {
  background: #fbf7ec;
  border: 1px solid #ebd498;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.lv-cx-poem-box::before {
  content: "❝";
  position: absolute;
  top: 6px;
  left: 12px;
  font-size: 32px;
  color: #d1b46a;
  opacity: 0.5;
}

.lv-cx-poem-box::after {
  content: "❞";
  position: absolute;
  bottom: -10px;
  right: 12px;
  font-size: 32px;
  color: #d1b46a;
  opacity: 0.5;
}

.lv-cx-poem-title {
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8c6418;
  font-weight: 750;
  margin-bottom: 10px;
}

.lv-cx-poem-text {
  font-size: 16px;
  font-style: italic;
  line-height: 1.8;
  color: #2c3e35;
  white-space: pre-line;
  margin: 0;
  font-weight: 600;
}

.lv-cx-desc {
  background: #ffffff;
  border: 1px solid #e2ece3;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14.5px;
  color: #274033;
  line-height: 1.6;
}

.lv-cx-desc strong {
  color: #123b32;
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .lv-tool-wrap {
    padding: 20px 16px;
  }
  .lv-tool-header h3 {
    font-size: 21px;
  }
  .lv-converter-card {
    grid-template-columns: 1fr;
  }
  .lv-cx-breakdown {
    grid-template-columns: repeat(2, 1fr);
  }
  .lv-cx-total-weight {
    font-size: 28px;
  }
}
