/*
 * Modal đăng nhập / đăng ký — tách từ <style> inline trong header.php
 * sang file riêng để trình duyệt có thể cache (trước đây in lại HTML
 * mỗi lần tải trang cho khách chưa đăng nhập).
 * Chỉ enqueue khi ! is_user_logged_in() — xem functions.php.
 */
.htta-auth-overlay{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;padding:16px;}
.htta-auth-overlay.open{display:flex;}
.htta-auth-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5);backdrop-filter:blur(3px);}
.htta-auth-box{position:relative;z-index:1;background:#fff;border-radius:16px;width:100%;max-width:420px;padding:32px 28px 24px;box-shadow:0 20px 60px rgba(0,0,0,.25);animation:htta-modal-in .22s ease;}
@keyframes htta-modal-in{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:translateY(0);}}
.htta-auth-close{position:absolute;top:12px;right:14px;background:none;border:none;font-size:26px;line-height:1;color:#9CA3AF;cursor:pointer;padding:4px 8px;border-radius:6px;transition:color .15s,background .15s;}
.htta-auth-close:hover{color:#111827;background:#F3F4F6;}
.htta-auth-tabs{display:flex;margin-bottom:20px;background:#F3F4F6;border-radius:10px;padding:4px;gap:0;}
.htta-auth-tab{flex:1;background:none;border:none;border-radius:7px;padding:8px 0;font-size:14px;font-weight:600;color:#6B7280;cursor:pointer;transition:all .15s;}
.htta-auth-tab.active{background:#fff;color:#111827;box-shadow:0 1px 4px rgba(0,0,0,.1);}
.htta-auth-notice{padding:10px 14px;border-radius:8px;font-size:13px;font-weight:600;margin-bottom:14px;text-align:center;}
.htta-auth-notice.error{background:#FEE2E2;color:#991B1B;border:1px solid #FCA5A5;}
.htta-auth-notice.success{background:#D1FAE5;color:#065F46;border:1px solid #6EE7B7;}
.htta-auth-desc{font-size:13px;color:#6B7280;margin:0 0 16px;line-height:1.5;}
.htta-auth-form{display:flex;flex-direction:column;gap:13px;}
.htta-auth-field{display:flex;flex-direction:column;gap:5px;}
.htta-auth-field label{font-size:13px;font-weight:600;color:#374151;}
.htta-auth-field input{border:1.5px solid #E5E7EB;border-radius:8px;padding:10px 12px;font-size:14px;outline:none;transition:border-color .15s,box-shadow .15s;width:100%;box-sizing:border-box;color:#111827;background:#fff;}
.htta-auth-field input:focus{border-color:#6366F1;box-shadow:0 0 0 3px rgba(99,102,241,.1);}
.htta-pass-wrap{position:relative;}
.htta-pass-wrap input{padding-right:44px;width:100%;box-sizing:border-box;}
.htta-pass-toggle{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:none;border:none;color:#9CA3AF;cursor:pointer;padding:4px;display:flex;align-items:center;transition:color .15s;}
.htta-pass-toggle:hover{color:#6366F1;}
.htta-pass-strength{height:3px;border-radius:2px;margin-top:5px;background:#E5E7EB;width:0;transition:all .3s;}
.htta-pass-strength.weak{background:#EF4444;width:33%;}
.htta-pass-strength.medium{background:#F59E0B;width:66%;}
.htta-pass-strength.strong{background:#10B981;width:100%;}
.htta-auth-row{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.htta-auth-check{display:flex;align-items:center;gap:6px;font-size:13px;color:#6B7280;cursor:pointer;}
.htta-auth-link{font-size:13px;color:#6366F1;text-decoration:none;}
.htta-auth-link:hover{text-decoration:underline;}
.htta-auth-submit{background:#6366F1;color:#fff;border:none;border-radius:8px;padding:12px;font-size:15px;font-weight:700;cursor:pointer;transition:background .2s,opacity .2s;margin-top:4px;width:100%;}
.htta-auth-submit:hover{background:#4F46E5;}
.htta-auth-submit:disabled{opacity:.6;cursor:not-allowed;}
.htta-auth-switch{text-align:center;font-size:13px;color:#6B7280;margin:14px 0 0;}
.htta-auth-link-btn{background:none;border:none;color:#6366F1;font-size:13px;font-weight:600;cursor:pointer;padding:0;}
.htta-auth-link-btn:hover{text-decoration:underline;}
body.htta-modal-open{overflow:hidden;}
@media(max-width:480px){.htta-auth-box{padding:24px 16px 20px;}}
