/* =========================================
   TỨ TRỤ MỆNH BÀN - WordPress Plugin CSS
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

:root {
  --ttmb-primary: #1e3a8a;
  --ttmb-gold: #3b82f6;
  --ttmb-gold-light: #bfdbfe;
  --ttmb-dark: #0f172a;
  --ttmb-border: #94a3b8;
  --ttmb-bg: #f8fafc;
  --ttmb-bg-card: #ffffff;
  --ttmb-text: #1e293b;
  --ttmb-text-light: #475569;
  --ttmb-active-bg: #e0f2fe;

  --ttmb-kim: #64748b;
  --ttmb-moc: #15803d;
  --ttmb-thuy: #0369a1;
  --ttmb-hoa: #b91c1c;
  --ttmb-tho: #a16207;
}

.ttmb-wrap {
  font-family: 'Be Vietnam Pro', sans-serif;
  color: var(--ttmb-text);
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ======= FORM CARD ======= */
.ttmb-form-card {
  background: var(--ttmb-bg-card);
  border: 1px solid var(--ttmb-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(139,26,26,0.08);
}

.ttmb-form-header {
  background: linear-gradient(135deg, var(--ttmb-primary) 0%, #5C0E0E 100%);
  padding: 24px 28px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.ttmb-logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.ttmb-logo-icon {
  font-size: 2.2rem;
  color: var(--ttmb-gold);
  line-height: 1;
}

.ttmb-brand {
  color: var(--ttmb-gold);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.ttmb-brand-sub {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
}

.ttmb-form-title {
  color: white;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
}

.ttmb-form-title span {
  color: var(--ttmb-gold-light);
  font-family: 'Playfair Display', serif;
}

.ttmb-form {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ttmb-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ttmb-text-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ttmb-input, .ttmb-select {
  width: 100%;
  height: 44px !important;
  line-height: normal !important;
  padding: 10px 14px;
  border: 1.5px solid #E0CDB8;
  border-radius: 8px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.95rem;
  color: var(--ttmb-text);
  background: #FDFAF6;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A84C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

.ttmb-input {
  background-image: none;
  padding-right: 14px;
}

.ttmb-input:focus, .ttmb-select:focus {
  outline: none;
  border-color: var(--ttmb-primary);
  box-shadow: 0 0 0 3px rgba(139,26,26,0.1);
}

.ttmb-row {
  display: grid;
  gap: 16px;
}

.ttmb-row-3 { grid-template-columns: repeat(3, 1fr); }
.ttmb-row-2 { grid-template-columns: repeat(2, 1fr); }
.ttmb-full { width: 100%; }

.ttmb-submit-row {
  display: flex;
  justify-content: flex-start;
  padding-top: 8px;
}

.ttmb-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--ttmb-primary) 0%, #6E1414 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 12px rgba(139,26,26,0.3);
}

.ttmb-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(139,26,26,0.4);
}

.ttmb-btn-icon {
  color: var(--ttmb-gold-light);
  font-size: 0.9rem;
}

/* ======= LÁ SỐ RESULT ======= */
.ttmb-result-wrap {
  margin-top: 28px;
}

.ttmb-la-so {
  background: white;
  border: 2px solid #2f5597;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  position: relative;
}

.ttmb-ls-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 18px 22px;
  background: #f1f5f9;
  border-bottom: 2px solid #2f5597;
}

.ttmb-ls-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ttmb-ls-logo-icon {
  font-size: 3rem;
  color: var(--ttmb-primary);
  filter: drop-shadow(0 2px 4px rgba(30, 58, 138, 0.2));
}

.ttmb-ls-brand {
  font-size: 0.8rem;
  color: var(--ttmb-text-light);
  font-style: italic;
}

.ttmb-ls-title-main {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ttmb-primary);
  letter-spacing: 0.08em;
}

.ttmb-ls-brand-logo {
  display: block;
  width: 118px;
  height: auto;
  margin: 8px auto 0;
}

.ttmb-ls-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ttmb-ls-info-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.88rem;
}

.ttmb-ls-info-label {
  color: var(--ttmb-text-light);
  min-width: 170px;
  font-size: 0.82rem;
}

.ttmb-ls-info-sep { color: var(--ttmb-text-light); }

/* Tables */
.ttmb-table-wrap {
  overflow-x: auto;
}

.ttmb-main-table,
.ttmb-dai-van-table,
.ttmb-luu-nien-table,
.ttmb-menh-table,
.ttmb-than-sat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ttmb-main-table td,
.ttmb-dai-van-table td,
.ttmb-luu-nien-table td {
  border: 1px solid #94a3b8;
  padding: 8px 6px;
  vertical-align: middle;
}

.ttmb-cell-label {
  background: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  color: #1e293b;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
  padding: 8px 10px !important;
  width: 64px;
  min-width: 64px;
}

.ttmb-center { text-align: center; }

/* Dương lịch row */
.ttmb-row-header-dl td {
  background: #f8fafc;
  font-weight: 700;
  font-size: 1rem;
  color: #1e293b;
}

/* Bát Tự */
.ttmb-can {
  font-size: 1.5rem;
  font-weight: 800;
  padding: 10px 6px !important;
  letter-spacing: 0.02em;
}

.ttmb-chi {
  font-size: 1.5rem;
  font-weight: 800;
  padding: 10px 6px !important;
}

.ttmb-nhat-can, .ttmb-nhat-chi {
  background: rgba(201,168,76,0.08);
}

.ttmb-ct { font-size: 0.82rem; font-weight: 500; }

.ttmb-nhat-chu {
  font-size: 0.78rem !important;
  color: var(--ttmb-primary) !important;
  font-weight: 700 !important;
}

/* Tàng ẩn */
.ttmb-tang-an { padding: 6px 4px !important; }
.ttmb-ta-item {
  display: inline-block;
  margin: 0 3px;
  font-size: 0.82rem;
  font-weight: 500;
}
.ttmb-ta-chu { font-weight: 700; }

/* Phó tinh */
.ttmb-pho-tinh { padding: 6px 4px !important; }
.ttmb-pt-item {
  display: inline-block;
  margin: 0 2px;
  font-size: 0.78rem;
  color: var(--ttmb-text-light);
}

/* Nạp âm */
.ttmb-nap-am { font-size: 0.82rem; color: var(--ttmb-text-light); font-style: italic; }

/* Ngũ hành colors */
.ttmb-nh-kim { color: var(--ttmb-kim) !important; }
.ttmb-nh-moc { color: var(--ttmb-moc) !important; }
.ttmb-nh-thuy { color: var(--ttmb-thuy) !important; }
.ttmb-nh-hoa { color: var(--ttmb-hoa) !important; }
.ttmb-nh-tho { color: var(--ttmb-tho) !important; }
/* Section title */
.ttmb-section-title {
  background: #f1f5f9;
  border-top: 1px solid #2f5597;
  border-bottom: 1px solid #2f5597;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e3a8a;
  padding: 10px 14px;
  text-transform: uppercase;
}

.ttmb-dv-info-text {
  padding: 8px 14px;
  font-size: 0.85rem;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid #94a3b8;
}

/* 100-year Dai Van grid */
.ttmb-100y-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid #94a3b8;
}

.ttmb-100y-cell {
  border-right: 1px solid #94a3b8;
  border-bottom: 1px solid #94a3b8;
}

.ttmb-100y-grid > .ttmb-100y-cell:nth-child(5n) {
  border-right: none;
}

.ttmb-100y-dv-header {
  background: #f8fafc;
  padding: 8px;
  border-bottom: 1px solid #94a3b8;
  text-align: center;
}

.ttmb-dv-active-header {
  background: #e0f2fe;
}

.ttmb-100y-dv-time {
  font-size: 0.8rem;
  color: #1e293b;
  margin-bottom: 4px;
}

.ttmb-100y-dv-cc {
  font-size: 0.9rem;
  font-weight: 700;
}

.ttmb-100y-ln-list {
  background: #ffffff;
}

.ttmb-100y-ln-item {
  display: flex;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-bottom: 1px dashed #cbd5e1;
  align-items: center;
}

.ttmb-100y-ln-item:last-child {
  border-bottom: none;
}

.ttmb-ln-active-item {
  background: #e0f2fe;
  font-weight: 600;
}

.ttmb-100y-ln-y {
  width: 32px;
  color: #475569;
}

.ttmb-100y-ln-sep {
  margin: 0 4px;
  color: #cbd5e1;
}

.ttmb-100y-ln-c {
  flex: 1;
  font-weight: 600;
}

.ttmb-100y-ln-t {
  width: 45px;
  text-align: right;
  color: #64748b;
}

/* Bottom section */
.ttmb-bottom-section {
  display: flex;
  border-bottom: 2px solid #2f5597;
}

.ttmb-than-sat-wrap {
  flex: 1;
}

.ttmb-than-sat-title {
  background: #F5EDD8;
  border-bottom: 1px solid var(--ttmb-border);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #5A3520;
  text-align: center;
  padding: 8px;
}

.ttmb-menh-table td { 
  border: 1px solid var(--ttmb-border); 
  padding: 7px 10px;
  font-size: 0.85rem;
}

.ttmb-than-sat-table th {
  background: #F5EDD8;
  border: 1px solid var(--ttmb-border);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  padding: 7px 4px;
  color: #5A3520;
}

.ttmb-than-sat-table td {
  border: 1px solid var(--ttmb-border);
  text-align: center;
  padding: 10px 4px;
  font-size: 0.85rem;
}

/* Legend */
.ttmb-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 10px;
  background: #FDFAF6;
  border-top: 1px solid var(--ttmb-border);
  font-size: 0.8rem;
}

.ttmb-legend-item { font-weight: 500; }

/* Footer */
.ttmb-footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--ttmb-text-light);
  padding: 8px;
  border-top: 1px solid #EDE0CC;
  background: #FDFAF6;
}

/* Action buttons */
.ttmb-print-btn-wrap {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 14px;
  background: #FDFAF6;
  border-top: 1px solid #EDE0CC;
}

.ttmb-btn-print, .ttmb-btn-back {
  padding: 9px 20px;
  border-radius: 6px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.ttmb-btn-print {
  background: var(--ttmb-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(139,26,26,0.25);
}

.ttmb-btn-print:hover { background: #6E1414; }

.ttmb-btn-back {
  background: #F5EDD8;
  color: var(--ttmb-text);
  border: 1px solid var(--ttmb-border);
}

.ttmb-btn-back:hover { background: #EDE0C8; }

.ttmb-download-image-wrap {
  padding: 14px;
  background: #FDFAF6;
  border-top: 1px solid #EDE0CC;
  text-align: center;
}

.ttmb-download-hint {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--ttmb-text-light);
}

.ttmb-download-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--ttmb-border);
  background: #fff;
}

.ttmb-manh-party-box {
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(255, 245, 219, 0.96)) !important;
  border: 1px solid #d7a955 !important;
  box-shadow: 0 14px 34px rgba(127, 29, 29, 0.08) !important;
}

.ttmb-manh-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.ttmb-manh-hero > div,
.ttmb-tocong-card {
  border: 1px solid #e5c47b;
  background: linear-gradient(180deg, #fffdf6, #fff4da);
  border-radius: 8px;
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.ttmb-manh-kicker {
  display: inline-block;
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
}

.ttmb-manh-hero h4 {
  margin: 0 0 8px;
  color: #7f1d1d;
  font-size: 17px;
}

.ttmb-manh-hero p,
.ttmb-manh-meaning,
.ttmb-manh-conclusion,
.ttmb-tocong-card p {
  color: #2f1b10;
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
}

.ttmb-manh-meaning,
.ttmb-manh-conclusion {
  border-left: 4px solid #b45309;
  background: #fff7ed;
  padding: 12px 14px;
  border-radius: 6px;
  margin: 14px 0;
}

.ttmb-tocong-grid {
  display: grid;
  gap: 12px;
}

.ttmb-tocong-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ttmb-tocong-index {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #8b1a1a;
  color: #fff8e7;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(139, 26, 26, 0.22);
}

.ttmb-tocong-card strong {
  display: block;
  color: #7f1d1d;
  font-size: 15px;
  margin-bottom: 3px;
}

.ttmb-tocong-card span {
  display: inline-block;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.ttmb-element-panel {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.ttmb-pie-shell {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto;
}

.ttmb-pie-shell .ttmb-pie {
  width: 240px;
  height: 240px;
  border-width: 10px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.ttmb-pie-center {
  position: absolute;
  inset: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5e7eb;
  color: #111827;
}

.ttmb-pie-center strong {
  font-size: 34px;
  line-height: 1;
  color: #8b1a1a;
}

.ttmb-pie-center span {
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
  text-transform: uppercase;
}

.ttmb-legend-line {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.ttmb-legend-line strong {
  color: #111827;
  font-size: 20px;
}

.ttmb-element-low {
  border-color: #dc2626 !important;
  background: #fff1f2 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}

.ttmb-element-note {
  margin: 16px 0 0;
  padding: 13px 15px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #fed7aa;
  color: #374151;
  font-size: 14px;
  line-height: 1.75;
}

/* Loading overlay */
.ttmb-loading {
  text-align: center;
  padding: 40px;
  color: var(--ttmb-text-light);
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .ttmb-row-3 { grid-template-columns: 1fr 1fr; }
  .ttmb-form { padding: 18px 16px; }
  .ttmb-ls-header { flex-direction: column; gap: 12px; }
  .ttmb-ls-info-label { min-width: 130px; }
  .ttmb-can, .ttmb-chi { font-size: 1.15rem !important; }
  .ttmb-bottom-section { flex-direction: column; }
  .ttmb-menh-cung-wrap { border-right: none; border-bottom: 1px solid var(--ttmb-border); }
  .ttmb-manh-hero { grid-template-columns: 1fr; }
  .ttmb-tocong-card { grid-template-columns: 34px minmax(0, 1fr); padding: 13px; }
  .ttmb-tocong-index { width: 30px; height: 30px; }
  .ttmb-element-panel { padding: 14px; }
  .ttmb-pie-shell, .ttmb-pie-shell .ttmb-pie { width: 210px; height: 210px; }
  .ttmb-pie-center { inset: 62px; }
}

/* Print styles */
@media print {
  .ttmb-form-card, .ttmb-print-btn-wrap { display: none !important; }
  .ttmb-la-so { box-shadow: none; border: 1px solid #ccc; }
  .ttmb-wrap { padding: 0; }
}

/* ======= PREMIUM LA SO SKIN ======= */
.ttmb-la-so {
  border: 1px solid #7fb0d3;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 34%, rgba(220, 177, 95, 0.17) 0 13%, transparent 34%),
    linear-gradient(135deg, #fffaf0 0%, #fff5df 44%, #fffdf8 100%);
  box-shadow:
    0 18px 42px rgba(43, 62, 87, 0.14),
    0 0 0 6px rgba(127, 176, 211, 0.08);
}

.ttmb-la-so::before {
  content: "BÁT TỰ TÂM AN";
  top: 286px;
  color: rgba(166, 115, 45, 0.13);
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: none;
}

.ttmb-la-so::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 1;
  border: 1px solid rgba(201, 168, 76, 0.38);
  border-radius: 10px;
  pointer-events: none;
}

.ttmb-ls-header {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 244, 219, 0.88)),
    radial-gradient(circle at 12% 20%, rgba(201, 168, 76, 0.28), transparent 32%);
  border-bottom: 2px solid #7fb0d3;
  padding: 22px 26px;
}

.ttmb-ls-title-main {
  color: #8b1a1a !important;
  font-size: 1.55rem !important;
  letter-spacing: 0.09em;
  text-shadow: 0 1px 0 #fff, 0 8px 18px rgba(139, 26, 26, 0.14);
}

.ttmb-ls-brand-logo {
  width: 108px;
  filter: drop-shadow(0 8px 14px rgba(44, 24, 16, 0.16));
}

.ttmb-ls-info-row {
  color: #26140b;
  font-weight: 500;
}

.ttmb-ls-info-row strong {
  color: #3b160d;
  letter-spacing: 0.02em;
}

.ttmb-table-wrap {
  background: rgba(255, 252, 245, 0.74);
}

.ttmb-main-table,
.ttmb-dai-van-table,
.ttmb-luu-nien-table,
.ttmb-menh-table,
.ttmb-than-sat-table {
  background: rgba(255, 250, 240, 0.78);
}

.ttmb-main-table td,
.ttmb-dai-van-table td,
.ttmb-luu-nien-table td,
.ttmb-menh-table td,
.ttmb-than-sat-table td,
.ttmb-than-sat-table th {
  border-color: #86b4d5;
}

.ttmb-cell-label,
.ttmb-than-sat-title,
.ttmb-section-title,
.ttmb-than-sat-table th {
  background: linear-gradient(180deg, #f7ecd2 0%, #f1dfb9 100%) !important;
  color: #15223a;
  font-weight: 900;
  text-transform: uppercase;
}

.ttmb-row-header-dl td {
  background: linear-gradient(180deg, #fff9ea 0%, #f7e8c4 100%) !important;
  color: #24170d;
}

.ttmb-main-table td:not(.ttmb-cell-label),
.ttmb-dai-van-table td:not(.ttmb-cell-label),
.ttmb-luu-nien-table td:not(.ttmb-cell-label) {
  background-color: rgba(255, 253, 247, 0.72);
}

.ttmb-row-can td:not(.ttmb-cell-label),
.ttmb-row-chi td {
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 168, 76, 0.16), transparent 62%),
    rgba(255, 252, 246, 0.86) !important;
}

.ttmb-can,
.ttmb-chi {
  font-size: 1.62rem !important;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 #fff, 0 6px 14px rgba(0, 0, 0, 0.10);
}

.ttmb-ct,
.ttmb-red-text {
  color: #7f1d1d !important;
  font-weight: 800;
}

.ttmb-dv-active,
.ttmb-ln-active {
  background:
    linear-gradient(180deg, rgba(255, 238, 179, 0.86), rgba(255, 248, 224, 0.92)) !important;
  box-shadow: inset 0 0 0 2px rgba(201, 168, 76, 0.36);
}

.ttmb-legend {
  background: linear-gradient(90deg, #fffaf0, #f7e9ca, #fffaf0);
  border-top-color: #86b4d5;
}

.ttmb-footer-note,
.ttmb-print-btn-wrap,
.ttmb-download-image-wrap {
  background: #fff9ea;
  border-top-color: #86b4d5;
}

@media (max-width: 600px) {
  .ttmb-la-so {
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(43, 62, 87, 0.12);
  }

  .ttmb-la-so::before {
    top: 345px;
    font-size: 26px;
    letter-spacing: 0.06em;
  }

  .ttmb-ls-header {
    padding: 18px 16px;
  }

  .ttmb-main-table,
  .ttmb-dai-van-table,
  .ttmb-luu-nien-table {
    min-width: 680px;
  }
}

/* Fix for HTML2Canvas table border overlap issues */
.ttmb-v2-chart {
  border: 4px solid #1e3a8a !important;
}
.ttmb-ls-header {
  border-bottom: 4px solid #1e3a8a !important;
}
.ttmb-v2-table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100%;
  min-width: 960px; /* Force scroll on mobile */
}
.ttmb-v2-table td, .ttmb-v2-table th {
  border: 2px solid #1e3a8a !important;
}

.ttmb-analysis-box p { color: #0f172a !important; font-weight: 600 !important; }

.ttmb-cal-summary span { font-weight: 600 !important; color: #0f172a !important; }

.ttmb-cal-pill { font-weight: 600 !important; }

.ttmb-info-card { font-family: 'Be Vietnam Pro', sans-serif !important; }

.ttmb-ai-container { font-family: 'Be Vietnam Pro', sans-serif !important; }

.ttmb-info-card p { color: #0f172a !important; font-weight: 600 !important; }
.ttmb-info-card h4 { color: #8b0000 !important; font-weight: 800 !important; font-family: 'Be Vietnam Pro', sans-serif !important; }

/* ======= INTRO BANNER ======= */
.ttmb-intro-banner {
  background: linear-gradient(145deg, #1e3a8a 0%, #152c6b 100%);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(30, 58, 138, 0.15);
  font-family: 'Be Vietnam Pro', sans-serif;
  position: relative;
  overflow: hidden;
}

.ttmb-intro-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, rgba(201, 168, 76, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.ttmb-intro-header {
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.ttmb-intro-logo {
  max-height: 80px;
  margin-bottom: 15px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.ttmb-intro-title {
  font-family: 'Playfair Display', serif;
  color: #C9A84C !important;
  font-size: 24px !important;
  font-weight: 700;
  margin: 0 0 8px 0 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ttmb-intro-subtitle {
  color: #e2e8f0;
  font-size: 15px;
  margin: 0;
  font-weight: 500;
}

.ttmb-intro-features {
  display: grid;
  gap: 15px;
  margin-bottom: 25px;
}

.ttmb-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid #C9A84C;
  transition: transform 0.3s ease, background 0.3s ease;
}

.ttmb-feature-item:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.08);
}

.ttmb-feature-icon {
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
}

.ttmb-feature-text {
  font-size: 14.5px;
  line-height: 1.5;
  color: #f1f5f9;
}

.ttmb-feature-text strong {
  color: #C9A84C;
  font-weight: 600;
}

.ttmb-intro-contact {
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 8px;
}

.ttmb-intro-contact p {
  font-size: 14.5px;
  margin: 0 0 15px 0 !important;
  color: #e2e8f0;
}

.ttmb-intro-contact strong {
  color: #C9A84C;
}

.ttmb-zalo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0068FF, #0054cc);
  color: #fff !important;
  text-decoration: none !important;
  padding: 10px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(0, 104, 255, 0.3);
  transition: all 0.3s ease;
}

.ttmb-zalo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 104, 255, 0.4);
  color: #fff !important;
}

@media (max-width: 600px) {
  .ttmb-intro-banner {
    padding: 20px;
  }
  .ttmb-intro-title {
    font-size: 20px !important;
  }
  .ttmb-feature-item {
    padding: 12px;
  }
}

/* Responsive Mobile Fixes */
@media (max-width: 980px) {
  .ttmb-v2-chart {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    display: block !important;
  }
  .ttmb-calendar-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .ttmb-cal-row {
    min-width: 800px; /* Force calendar to scroll instead of squishing too much */
  }
  .ttmb-ai-container {
    padding: 20px 15px !important;
  }
}
