/* ui295.css — tab TEMU JANJI (Semak Status) + kad TARIKH PENTING (papan pemuka)
   CSP: fail luaran sahaja. Tiada <style> dari JS. */

/* ══ Semak Status — tab TEMU JANJI ══════════════════════════════════════ */

.tj-bungkus { display: block; }

.tj-kad {
  border: 1px solid var(--border, #e5e2dc);
  border-radius: 14px;
  padding: 18px 18px 20px;
  background: var(--card, #fff);
  margin: 0 0 16px;
}

.tj-tajuk {
  font-size: 1.02rem;
  font-weight: 650;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.tj-nota {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted-foreground, #6b6b6b);
  margin: 0 0 16px;
}

.tj-medan { margin: 0 0 14px; }

.tj-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
  color: var(--foreground, #1a1a1a);
}

.tj-pilih,
.tj-teks {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.94rem;
  padding: 11px 12px;
  border: 1px solid var(--border, #d6d3cc);
  border-radius: 10px;
  background: var(--background, #fff);
  color: var(--foreground, #1a1a1a);
  min-height: 44px;
}

.tj-teks { min-height: 72px; resize: vertical; line-height: 1.5; }

.tj-pilih:focus-visible,
.tj-teks:focus-visible {
  outline: 2px solid var(--accent, #2b6cb0);
  outline-offset: 1px;
}

/* pilihan jenis — butang besar, mudah tekan pada telefon */
.tj-jenis { display: grid; gap: 8px; grid-template-columns: 1fr; }

@media (min-width: 520px) {
  .tj-jenis { grid-template-columns: 1fr 1fr; }
}

.tj-jenis button {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
  padding: 12px 13px;
  min-height: 52px;
  border: 1.5px solid var(--border, #d6d3cc);
  border-radius: 11px;
  background: var(--background, #fff);
  color: var(--foreground, #1a1a1a);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}

.tj-jenis button:hover { border-color: var(--accent, #2b6cb0); }

.tj-jenis button[aria-pressed="true"] {
  border-color: var(--accent, #2b6cb0);
  border-width: 2px;
  background: color-mix(in srgb, var(--accent, #2b6cb0) 8%, transparent);
  font-weight: 600;
}

.tj-jenis button:focus-visible {
  outline: 2px solid var(--accent, #2b6cb0);
  outline-offset: 2px;
}

/* baris masa — pilihan cepat + kotak taip sendiri */
.tj-masa { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 9px; }

.tj-masa button {
  font: inherit;
  font-size: 0.85rem;
  padding: 8px 13px;
  min-height: 40px;
  border: 1px solid var(--border, #d6d3cc);
  border-radius: 999px;
  background: var(--background, #fff);
  color: var(--foreground, #1a1a1a);
  cursor: pointer;
}

.tj-masa button[aria-pressed="true"] {
  border-color: var(--accent, #2b6cb0);
  border-width: 2px;
  background: color-mix(in srgb, var(--accent, #2b6cb0) 10%, transparent);
  font-weight: 600;
}

.tj-hantar {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 650;
  padding: 14px 18px;
  min-height: 50px;
  border: 0;
  border-radius: 11px;
  background: var(--accent, #1f5f9e);
  color: #fff;
  cursor: pointer;
  margin: 6px 0 0;
}

.tj-hantar:disabled { opacity: .6; cursor: not-allowed; }
.tj-hantar:focus-visible { outline: 3px solid var(--accent, #1f5f9e); outline-offset: 3px; }

.tj-ralat {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #8a1c1c;
  background: #fdf0f0;
  border: 1px solid #f0c8c8;
  border-radius: 9px;
  padding: 10px 12px;
  margin: 10px 0 0;
}

/* kad pengesahan */
.tj-siap {
  border: 1px solid #c8e0c8;
  background: #f4faf4;
  border-radius: 13px;
  padding: 16px 17px;
  margin: 0 0 14px;
}

.tj-siap h3 {
  font-size: 0.98rem;
  margin: 0 0 8px;
  color: #1f5c1f;
}

.tj-siap dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 12px;
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.tj-siap dt { color: var(--muted-foreground, #6b6b6b); }
.tj-siap dd { margin: 0; font-weight: 600; word-break: break-word; }

.tj-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 620;
  padding: 12px 17px;
  min-height: 46px;
  border-radius: 10px;
  border: 0;
  background: #1f8a3d;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

.tj-wa:focus-visible { outline: 3px solid #1f8a3d; outline-offset: 3px; }

.tj-senarai { margin: 0; padding: 0; list-style: none; }

.tj-senarai li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--border, #edeae4);
  font-size: 0.88rem;
}

.tj-senarai li:first-child { border-top: 0; }

.tj-batal {
  font: inherit;
  font-size: 0.8rem;
  padding: 7px 12px;
  min-height: 38px;
  border: 1px solid #e0c8c8;
  border-radius: 8px;
  background: #fff;
  color: #8a1c1c;
  cursor: pointer;
}

.tj-lencana {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  background: #eee9df;
  color: #5c5346;
}

.tj-lencana.selesai { background: #dff0df; color: #1f5c1f; }
.tj-lencana.batal { background: #f5e0e0; color: #8a1c1c; }
.tj-lencana.baru { background: #e4ecf7; color: #1f4f80; }

/* ══ Papan pemuka — kad TARIKH PENTING ═════════════════════════════════ */

.tjp-kad {
  border: 1px solid var(--border, #e5e2dc);
  border-radius: 13px;
  background: var(--card, #fff);
  padding: 0;
  margin: 0 0 14px;
  overflow: hidden;
}

.tjp-kepala {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border, #edeae4);
  background: #fbf9f5;
}

.tjp-kepala h3 {
  font-size: 0.94rem;
  font-weight: 650;
  margin: 0;
  letter-spacing: -0.005em;
}

.tjp-kira {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-foreground, #6b6b6b);
  white-space: nowrap;
}

.tjp-hari {
  padding: 11px 16px 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground, #6b6b6b);
}

.tjp-hari.hari-ini { color: #1f5f9e; }

.tjp-baris {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 16px;
  border-top: 1px solid #f3f0eb;
  font-size: 0.86rem;
  cursor: pointer;
}

.tjp-baris:hover { background: #faf8f4; }

.tjp-baris:focus-visible {
  outline: 2px solid var(--accent, #2b6cb0);
  outline-offset: -2px;
}

.tjp-masa {
  font-variant-numeric: tabular-nums;
  font-weight: 640;
  font-size: 0.84rem;
}

.tjp-nama { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tjp-nama b { font-weight: 640; }
.tjp-nama small { display: block; color: var(--muted-foreground, #6b6b6b); font-size: 0.78rem; }

.tjp-tanda { display: flex; gap: 6px; align-items: center; }

.tjp-cip {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.tjp-cip.ok { background: #dff0df; color: #1f5c1f; }
.tjp-cip.warn { background: #fdf3dd; color: #7a5300; }
.tjp-cip.batal { background: #f5e0e0; color: #8a1c1c; }
.tjp-cip.siap { background: #dff0df; color: #1f5c1f; }

.tjp-kosong {
  padding: 20px 16px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted-foreground, #6b6b6b);
}

.tjp-kaki {
  padding: 10px 16px;
  border-top: 1px solid var(--border, #edeae4);
  font-size: 0.78rem;
  color: var(--muted-foreground, #6b6b6b);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 420px) {
  .tjp-baris { grid-template-columns: 70px 1fr; }
  .tjp-tanda { grid-column: 2; justify-content: flex-start; }
}


/* ══ v295 — pembetulan semakan visual ══════════════════════════════════ */

/* sub-medan (1b) — inden supaya jelas ia sebahagian soalan 1 */
.tj-sub {
  margin-left: 14px;
  padding-left: 13px;
  border-left: 3px solid var(--border, #e5e2dc);
}

.tj-wajib {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fdf0e6;
  color: #8a4a00;
  vertical-align: middle;
}

/* tanda pilihan — bukan warna sahaja (aksesibiliti) */
.tj-ikon { flex: 0 0 auto; }
.tj-teks-jenis { flex: 1 1 auto; }

.tj-tanda-sah {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border, #c9c5bd);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.tj-jenis button[aria-pressed="true"] .tj-tanda-sah,
.tj-masa button[aria-pressed="true"] .tj-tanda-sah {
  border-color: var(--accent, #1f5f9e);
  background: var(--accent, #1f5f9e);
}

.tj-jenis button[aria-pressed="true"] .tj-tanda-sah::after,
.tj-masa button[aria-pressed="true"] .tj-tanda-sah::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* chip masa — sasaran sentuh 44px */
.tj-masa button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 14px;
}

/* medan tarikh: teks lebih besar, jelas */
.tj-pilih[type="date"] {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* elak dua bingkai biru serentak — fokus hanya apabila benar-benar fokus */
.tj-jenis button:focus-visible,
.tj-masa button:focus-visible,
.tj-sub .tj-teks:focus-visible {
  outline: 2px solid var(--accent, #1f5f9e);
  outline-offset: 2px;
}


/* v295 — cip status: kuning = menunggu, hijau = selesai (konvensyen) */
.tjp-cip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 5px;
}

.tjp-cip.warn { background: #fdf3dd; color: #7a5300; border: 1px solid #f0e0b8; }
.tjp-cip.siap { background: #dff0df; color: #1f5c1f; border: 1px solid #c3e0c3; }

/* selesai awal — tarikh belum tiba tetapi sudah ditanda selesai */
.tjp-cip.beku { background: #eceef1; color: #3d4753; border: 1px solid #d6dae0; }

/* label "tidak wajib" — jelas bahawa medan ini boleh dilangkau */
.tj-lain {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f2f0ec;
  color: #6b6459;
  vertical-align: middle;
}
