/* CLINIC-SCOPE: module:UILogin */
/* Đăng nhập bản điện thoại. Chỉ dùng token của design-tokens.css. Ô nhập chữ 16px để iOS không tự phóng to; vùng chạm >= 44px. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--surface); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, var(--font-ui); font-size: var(--fs-lg); line-height: 1.4; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.dn { min-height: 100dvh; display: flex; flex-direction: column; }
.dn-dau { position: relative; flex: 0 0 auto; min-height: 32dvh; display: flex; align-items: flex-end; overflow: hidden; background: var(--brand-dark); }
.dn-nen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Lớp tối dưới chữ để tên đơn vị đọc được trên mọi ảnh nền */
.dn-dau::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, .1) 0%, rgba(15, 23, 42, .72) 100%); }
.dn-hieu { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--sp-3); padding: calc(env(safe-area-inset-top) + var(--sp-5)) var(--sp-5) calc(var(--sp-5) + 16px); color: var(--btn-on); min-width: 0; }
.dn-logo { flex: 0 0 56px; width: 56px; height: 56px; object-fit: contain; background: var(--surface); border-radius: var(--radius-noi); padding: 4px; }
.dn-ten { min-width: 0; }
.dn-ten b { display: block; font-size: var(--fs-xl); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.dn-ten span { display: block; font-size: var(--fs-md); opacity: .92; overflow-wrap: anywhere; }

.dn-than { position: relative; z-index: 1; flex: 1 1 auto; margin-top: -16px; padding: var(--sp-5) var(--sp-5) calc(env(safe-area-inset-bottom) + var(--sp-5)); background: var(--surface); border-radius: var(--radius-noi) var(--radius-noi) 0 0; display: flex; flex-direction: column; }
.dn-than form { display: grid; gap: var(--sp-3); }
.dn-than h1 { margin: 0 0 var(--sp-1); font-size: var(--fs-2xl); font-weight: 700; }
.dn-truong { display: grid; gap: var(--sp-1); }
.dn-truong label { font-size: var(--fs-md); font-weight: 600; }
.req { color: var(--req); font-weight: var(--fw-bold); }
.dn-truong input { width: 100%; height: 48px; padding: 0 var(--sp-3); font-size: 16px; background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-btn); }
.dn-truong input:focus { background: var(--surface); border-color: var(--brand); }
.dn-truong input[aria-invalid="true"] { border-color: var(--st-danger-text); }
.dn-loi { min-height: 1lh; font-size: var(--fs-sm); color: var(--st-danger-text); }
.dn-loi:empty { min-height: 0; }
.dn-mk { position: relative; }
.dn-mk input { padding-right: 72px; }
.dn-mk button { position: absolute; right: 0; top: 0; width: 64px; height: 48px; border: 0; background: none; font-size: var(--fs-md); font-weight: 600; color: var(--brand-dark); cursor: pointer; }
.dn-nho { display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; font-size: var(--fs-md); }
.dn-nho input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.dn-bao { margin: 0; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-md); font-weight: 600; color: var(--st-danger-text); background: var(--st-danger-bg); border-radius: var(--radius-btn); }
.dn-bao[hidden] { display: none; }
.dn-nut { height: 52px; border: 0; border-radius: var(--radius-btn); background: var(--brand); color: var(--btn-on); font-size: var(--fs-lg); font-weight: 700; cursor: pointer; }
.dn-nut:active { background: var(--brand-dark); }
.dn-nut[disabled] { opacity: .6; cursor: progress; }
.dn-maytinh { margin-top: auto; padding-top: var(--sp-5); align-self: center; min-height: 44px; display: inline-flex; align-items: center; font-size: var(--fs-md); color: var(--brand-dark); }
@media (max-height: 560px) { .dn-dau { min-height: 0; } .dn-hieu { padding-top: calc(env(safe-area-inset-top) + var(--sp-3)); padding-bottom: calc(var(--sp-3) + 16px); } }
