/* components.css - modal, dieu khien, soan so, chon/xem so */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #21180e88;
}
#langdialog {
  background: var(--bg);
}
.modal-backdrop[hidden] {
  display: none;
}
.modal {
  width: min(100%, 380px);
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 16px 48px #0003;
}
.modal .lock {
  font-size: 28px;
}
.modal h2 {
  margin: 6px 0;
  font:
    600 20px "Times New Roman",
    Georgia,
    serif;
}
.modal .bar {
  justify-content: center;
}
.modal .secondary {
  background: #eee;
  color: #443c34;
  border-color: #ddd;
}
.error {
  color: var(--acc);
  min-height: 1.5em;
}
.lang-choose {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.lang-choose button {
  background: #7a4a21;
  border-color: #7a4a21;
  color: #f7ead2;
  font:
    600 15px "Times New Roman",
    Georgia,
    serif;
  padding: 11px 13px;
  border-radius: 7px;
}
.lang-choose button:hover {
  filter: brightness(1.08);
}
main {
  max-width: 900px;
  margin: auto;
  padding: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
label {
  display: block;
  font-size: 13px;
  color: var(--mut);
  margin: 10px 0 3px;
}
input,
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
input[type="radio"] {
  width: auto;
}
button {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
button.p,
nav button.on {
  background: var(--acc);
  color: #fff;
  border-color: var(--acc);
}
button.d {
  color: var(--acc);
}
.bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0;
}
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hint {
  font-size: 12px;
  color: var(--mut);
}
.r3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
/* === GIAI DOAN 2B: Chon so + Xem so (them moi, khong sua cu) === */
.entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.entry-go {
  font-size: 20px;
  line-height: 1;
  padding: 8px 14px;
  min-width: 52px;
  min-height: 44px;
}
.pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pick-head h2 {
  margin: 0;
  font:
    600 18px "Times New Roman",
    Georgia,
    serif;
  flex: 1;
  text-align: center;
}
.pick-head button {
  min-width: 44px;
  min-height: 44px;
  font-size: 18px;
}
.pick-count {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}
#pick_viewbtn {
  font-weight: 700;
  background: #f5a623;
  border-color: #d98a0b;
  color: #3a2400;
  padding: 10px 18px;
  min-height: 44px;
}
#pick_viewbtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#pick_q {
  margin: 6px 0;
  min-height: 44px;
  font-size: 16px;
}
.pick-list {
  border-top: 1px solid var(--line);
}
.pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
}
.pick-row input[type="checkbox"] {
  width: 26px;
  height: 26px;
  flex: none;
  margin: 0;
}
.pick-name {
  flex: 1;
  text-align: left;
  background: none;
  border: 0;
  color: #2222cc;
  font:
    600 16px "Times New Roman",
    Georgia,
    serif;
  padding: 10px 6px;
  cursor: pointer;
  word-break: break-word;
}
.pick-empty {
  padding: 18px;
  text-align: center;
  color: var(--mut);
}
.pv-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 10px;
}
.pv-bar button {
  font-size: 16px;
  padding: 8px 12px;
  min-height: 44px;
}
.pv-nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
#pv_sheets {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pv-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  break-inside: avoid;
}
.pv-title {
  padding: 8px 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.pv-item .sheet {
  width: 100%;
  max-width: 100%;
  touch-action: pan-x pan-y pinch-zoom;
}
@media (max-width: 480px) {
  .pick-row {
    padding: 12px 8px;
  }
  .pick-name {
    font-size: 16px;
  }
  main {
    padding: 12px;
  }
  .sheet {
    gap: 18px;
    padding: 16px;
  }
  .pv-bar {
    font-size: 14px;
  }
}
.subhead {
  font:
    600 18px "Times New Roman",
    Georgia,
    serif;
}
.entry-title {
  margin: 0;
  font:
    600 19px "Times New Roman",
    Georgia,
    serif;
}
.inline-label {
  display: inline;
  color: var(--ink);
}
#fc {
  min-height: 140px;
}
#cpn {
  width: 70px;
}
