/* Shared Google and A Ti sign-in; the full-page backdrop stays on login pages. */
body.ati-auth-page {
  background: #eab280;
  background-image: radial-gradient(ellipse at 8% 12%, #fff3cebd, transparent 43%), radial-gradient(ellipse at 98% 95%, #e7763f38, transparent 43%), linear-gradient(135deg, #ffe3ba, #efad7c);
  background-attachment: fixed;
}
.ati-auth-page .auth-page { position: relative; isolation: isolate; padding: 48px 32px; }
.ati-auth-page .auth-page::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .1; background-image: radial-gradient(#9c633d 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(135deg, #000, transparent 54%, #000); }
.ati-auth-page .auth-page::after { content: ''; position: absolute; z-index: -1; pointer-events: none; width: min(76vw, 1120px); aspect-ratio: 1; border: 1px solid #fff3df45; border-radius: 50%; box-shadow: 0 0 0 100px #fff3df20, 0 0 0 200px #fff3df12; }
.ati-auth-page .auth-shell { display: block; width: 100%; max-width: 1280px; overflow: visible; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; }
.ati-auth-page .auth-shell > .auth-brand { display: none; }
.ati-auth-page .auth-panel { display: block; padding: 0; background: transparent; }
.ati-auth-page .auth-card { max-width: none; border: 1px solid #fff8edb3; border-radius: 32px; overflow: hidden; background: #fffaf2; box-shadow: 0 32px 100px #8d49222b; }
.ati-auth-page .auth-card-body { padding: 0; }
.ati-auth-page .auth-alert-stack { margin: 20px; }
.ati-auth { --ati-orange: #c65122; --ati-ink: #433526; --ati-muted: #7a6b5c; --ati-border: #e5d8c5; position: relative; display: grid; grid-template-columns: .92fr 1.08fr; width: 100%; min-height: 740px; padding: 0; border-radius: 32px; background: #fffaf2; color: var(--ati-ink); font-family: 'Be Vietnam Pro', 'Segoe UI', Arial, sans-serif; text-align: left; }
.ati-auth *, .ati-auth *::before, .ati-auth *::after { box-sizing: border-box; }
.ati-auth [hidden] { display: none !important; }
.ati-auth button, .ati-auth input { font-family: inherit; }
.ati-auth button, .ati-auth a { -webkit-tap-highlight-color: transparent; }
.ati-auth button { cursor: pointer; }
.ati-auth button:disabled { cursor: wait; opacity: .65; }
.ati-auth :is(button, a, summary):focus-visible { outline: 3px solid #de894a; outline-offset: 4px; }
.ati-auth a { text-decoration: none; }
.ati-auth-hero { display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; padding: 36px; border-radius: 32px 0 0 32px; background: radial-gradient(ellipse at 0 0, #fff6dc, transparent 70%), linear-gradient(145deg, #ffe6bd, #f2b67f); }
.ati-mascot-art { display: block; width: 100%; max-width: 500px; aspect-ratio: 1; margin: 0 auto; padding: 7px; border-radius: 30px; background: #fff4dd; box-shadow: 0 14px 32px #a5632c24; }
.ati-mascot-art picture, .ati-mascot-art img { display: block; width: 100%; height: 100%; border-radius: 24px; }
.ati-mascot-art img { object-fit: contain; }
.ati-auth-content { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 50px 52px 38px; border-radius: 0 32px 32px 0; background: #fffaf2; }
.ati-close { position: absolute; right: 17px; top: 16px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; background: #f4eadb; color: #977657; font-size: 27px; font-weight: 400; line-height: 1; }
.ati-close:hover { color: #9e492a; background: #f6e5d3; }
.ati-panel-badge { display: inline-block; margin-bottom: 12px; color: #9b7650; font-size: 12px; font-weight: 650; letter-spacing: .08em; }
.ati-panel-title { margin: 0 0 30px; color: #493729; font-size: 38px; line-height: 1.25; letter-spacing: -.045em; font-weight: 800; }
.ati-login-hint { margin: -17px 0 27px; color: #947354; font-size: 14px; line-height: 1.7; }
.ati-recovery-link { display: block; margin-top: 22px; padding: 15px; border: 1px solid #ecd5b4; border-radius: 12px; color: #ad652e; background: #fff1db; font-size: 14px; line-height: 1.8; text-align: center; }
.ati-recovery-link:hover { color: #804825; background: #ffe9c8; }
.ati-panel-description { color: #7d6a59; font-size: 16px; line-height: 1.8; margin: -14px 0 26px; }
.ati-auth .ati-google-button { display: flex; align-items: center; justify-content: center; gap: 13px; width: 100%; min-height: 64px; padding: 14px 18px; border: 1px solid #e3d5c1; border-radius: 14px; background: #fffef9; color: #493e32; font-size: 18px; font-weight: 650; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.ati-auth .ati-google-button:hover { border-color: #c49a73; background: #fff; box-shadow: 0 4px 14px #a0662c0a; }
.ati-google-button svg { width: 25px; height: 25px; flex-shrink: 0; }
.ati-google-slot { display: block; min-height: 64px; }
.ati-entry-divider { display: flex; align-items: center; gap: 15px; margin: 25px 0; color: #8e7d69; font-size: 14px; }
.ati-entry-divider::before, .ati-entry-divider::after { content: ''; flex: 1; height: 1px; background: #e9dfcf; }
.ati-auth .auth-form { display: grid; gap: 18px; }
.ati-auth .auth-field { margin: 0; }
.ati-auth .auth-label { display: block; margin: 0 0 10px; color: #65523f; font-size: 16px; font-weight: 650; line-height: 1.5; }
.ati-auth .auth-input { display: block; width: 100%; min-height: 64px; padding: 16px 18px; border: 1px solid #e3d5c1; border-radius: 14px; background: #fffdf8; color: #493729; font-size: 18px; line-height: 1.5; box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; }
.ati-auth .auth-input.has-action { padding-right: 60px; }
.ati-auth .auth-input::placeholder { color: #9a8976; font-size: 18px; opacity: 1; }
.ati-auth .auth-input:focus { outline: none; border-color: #d58b51; box-shadow: 0 0 0 4px #e9ab6826; background: #fffef9; }
.ati-auth .auth-input-wrap { position: relative; }
.ati-auth .auth-input-action { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 44px; min-height: 44px; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: #8b735a; }
.ati-auth .auth-input-action:hover { background: #f9ebd7; color: #8a522b; }
.ati-code-input-icon { position: absolute; top: 50%; left: 19px; transform: translateY(-50%); width: 22px; height: 24px; color: #977c5d; pointer-events: none; }
.ati-code-input-icon svg, .ati-code-toggle svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ati-auth .ati-code-input-wrap .auth-input { padding-left: 55px; }
.ati-code-toggle .ati-eye-slash { display: none; }
.ati-code-toggle[aria-pressed="true"] .ati-eye-slash { display: block; }
.ati-auth .auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ati-auth .auth-check { display: flex; align-items: center; gap: 8px; color: #7d6a54; font-size: 14px; margin: 0; }
.ati-auth .auth-check input { accent-color: var(--ati-orange); width: 18px; height: 18px; margin: 0; }
.ati-auth .auth-primary-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 64px; padding: 15px 20px; border: 1px solid #c14f20; border-radius: 14px; background: #c95223; color: #fffaf2; box-shadow: 0 6px 16px #c4612221; font-size: 18px; font-weight: 700; line-height: 1.5; text-decoration: none; transition: background .15s ease, box-shadow .15s ease; }
.ati-auth .auth-primary-btn:hover { background: #b44319; box-shadow: 0 7px 20px #c4612230; }
.ati-auth .auth-primary-btn > span { margin-left: 4px; font-size: 23px; font-weight: 500; }
.ati-auth .ati-stable-code-form { gap: 10px; }
.ati-auth .ati-stable-code-form .auth-label { margin: 0; }
.ati-stable-code-form .auth-primary-btn { margin-top: 6px; }
.ati-feedback { margin: 4px 0 0; font-size: 14px; line-height: 1.7; color: #a84627; overflow-wrap: anywhere; }
.ati-feedback:empty { display: none; }
.ati-get-code { margin-top: 20px; }
.ati-code-actions { display: flex; align-items: stretch; gap: 10px; }
.ati-auth .ati-bot-action { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid #eed6b4; border-radius: 14px; color: #75421e; background: #fff1db; transition: background .15s ease, border-color .15s ease; }
.ati-auth .ati-bot-action:hover { background: #ffe9c8; border-color: #d9aa74; }
.ati-bot-action > img { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; background: #fff; }
.ati-bot-action > span { display: grid; gap: 4px; min-width: 0; }
.ati-bot-action strong { font-size: 16px; font-weight: 700; line-height: 1.4; }
.ati-bot-action small { color: #9a754e; font-size: 12px; line-height: 1.5; }
.ati-bot-action > svg { flex: 0 0 21px; width: 21px; height: 21px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ati-qr-option { flex: 0 0 80px; position: relative; }
.ati-qr-option > summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 100%; min-height: 74px; padding: 9px; border: 1px solid #e8d1af; border-radius: 14px; color: #9f6636; background: linear-gradient(145deg, #fffcf6, #ffedd4); box-shadow: inset 0 1px 0 #fff, 0 3px 8px #a86b2e08; list-style: none; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.ati-qr-option > summary::-webkit-details-marker { display: none; }
.ati-qr-option > summary:hover, .ati-qr-option[open] > summary { color: #ab5728; background: #fff0dc; border-color: #d9aa74; }
.ati-qr-option > summary:hover { box-shadow: inset 0 1px 0 #fff, 0 4px 12px #a86b2e16; }
.ati-qr-symbol { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #fffaf1; }
.ati-qr-symbol svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ati-qr-caption { font-size: 12px; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.ati-qr-popover { position: absolute; right: 0; bottom: calc(100% + 12px); z-index: 4; width: 260px; padding: 18px; border: 1px solid #ecdbc2; border-radius: 20px; background: #fffdf7; box-shadow: 0 15px 45px #8a532b32; text-align: center; }
.ati-qr-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; text-align: left; }
.ati-zalo-badge { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: #1478ea; font-family: Arial, sans-serif; font-size: 13px; font-weight: 700; }
.ati-qr-heading strong, .ati-qr-heading small { display: block; }
.ati-qr-heading strong { color: #78502f; font-size: 14px; line-height: 1.6; }
.ati-qr-heading small { margin-top: 1px; color: #a48667; font-size: 12px; line-height: 1.6; }
.ati-bot-qr { display: block; width: 100%; padding: 6px; border: 1px solid #ede1cf; border-radius: 10px; background: #fff; }
.ati-bot-qr img { display: block; width: 100%; height: auto; }
.ati-qr-popover p { margin: 12px 0 0; color: #8b6a47; font-size: 12px; line-height: 1.6; }
.ati-google-option { margin-top: 22px; border-top: 1px solid #ecdfce; }
.ati-google-option > summary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 13px; border-radius: 12px; color: #86694c; font-size: 15px; font-weight: 600; list-style: none; cursor: pointer; }
.ati-google-option > summary::-webkit-details-marker { display: none; }
.ati-google-option > summary:hover { color: #684326; background: #fff0db; }
.ati-google-option > summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; transition: transform .15s ease; }
.ati-google-option[open] > summary svg { transform: rotate(180deg); }
.ati-google-alternative { padding: 3px 0 8px; }
.ati-google-alternative > p { margin: 0 0 14px; color: #8a7258; font-size: 13px; line-height: 1.75; }
.ati-auth .ati-google-alternative .ati-google-button { min-height: 58px; font-size: 16px; }
.ati-copy-feedback { margin: 10px 2px 0; color: #9a6236; font-size: 13px; line-height: 1.7; }
.ati-copy-feedback:empty { display: none; }
.ati-manual-copy { display: flex; gap: 8px; margin-top: 10px; }
.ati-manual-copy input { min-width: 0; flex: 1; width: 100%; padding: 10px 12px; border: 1px solid #e6cfad; border-radius: 9px; background: #fffdf7; color: #80502f; font-size: 16px; }
.ati-manual-copy button { flex-shrink: 0; padding: 10px 12px; border: 1px solid #dec29d; border-radius: 9px; background: #ffedd4; color: #80502f; font-size: 14px; }
.ati-manual-copy input:focus { outline: 2px solid #dba26a; outline-offset: 2px; }
.ati-contact-note { flex: 1; margin: 0; color: #96704a; font-size: 14px; line-height: 1.7; }
.ati-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.ati-text-link { color: #a64c2b; border: 0; background: transparent; padding: 0; font-size: 14px; font-weight: 600; line-height: 1.7; }
.ati-text-link:hover { color: #863d24; text-decoration: underline; text-underline-offset: 4px; }
.ati-muted-link { background: none; border: 0; padding: 7px 0; color: #86715c; font-size: 15px; font-weight: 500; line-height: 1.7; }
.ati-muted-link:hover { color: #85512b; text-decoration: underline; text-underline-offset: 4px; }
.ati-wide-link { display: block; text-align: center; width: 100%; min-height: 44px; margin-top: 10px; }
.ati-terms { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 20px 0 0; color: #aa9580; font-size: 13px; line-height: 1.8; }
.ati-terms a { color: #8c7863; font-weight: 500; }
.ati-terms a:hover { color: #80502c; text-decoration: underline; text-underline-offset: 4px; }
.ati-back { display: inline-block; margin: 2px 0 24px; }
.ati-panel-note { font-size: 14px; color: #806d55; line-height: 1.8; margin: 20px 0 0; }
.ati-legacy-options { display: grid; gap: 14px; }
.ati-outline-button { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 16px 12px; border: 1px solid #e3d5c1; color: #6c4e34; background: #fffef9; font-size: 16px; font-weight: 600; border-radius: 14px; min-height: 60px; }
.ati-outline-button:hover { background: #fff2df; border-color: #d8ab7e; }
.ati-google-mark { color: #4285f4; font-size: 22px; font-family: Arial, sans-serif; font-weight: bold; }
.ati-approved-icon { display: grid; place-items: center; height: 62px; width: 62px; border-radius: 50%; background: #f8e7cb; color: #b07030; font-size: 32px; margin-bottom: 22px; }
.ati-login-modal .ati-auth { min-height: 680px; }
.ati-login-modal .ati-auth-hero { padding: 30px; gap: 26px; }
.ati-login-modal .ati-auth-content { padding: 48px 32px 30px; }
@media (max-width: 1120px) and (min-width: 801px) {
  .ati-auth-page .auth-page { padding: 32px 24px; }
  .ati-auth-hero { padding: 30px; gap: 26px; }
  .ati-auth-content { padding: 48px 36px 32px; }
  .ati-panel-title { font-size: 34px; }
}
@media (max-width: 800px) {
  .ati-auth-page .auth-page { padding: 24px 16px; align-items: center; overflow: hidden; }
  .ati-auth-page .auth-card { border-radius: 24px; max-width: 560px; margin: 0 auto; }
  .ati-auth, .ati-login-modal .ati-auth { display: flex; flex-direction: column; min-height: 0; border-radius: 24px; }
  .ati-auth-hero, .ati-login-modal .ati-auth-hero { padding: 0; border-radius: 24px 24px 0 0; }
  .ati-mascot-art { width: 100%; max-width: none; aspect-ratio: 1200 / 446; padding: 0; border-radius: 0; box-shadow: none; }
  .ati-mascot-art picture, .ati-mascot-art img { border-radius: 0; }
  .ati-auth-content, .ati-login-modal .ati-auth-content { padding: 28px 24px 24px; min-height: 0; border-radius: 0 0 24px 24px; }
  .ati-close { top: 25px; right: 20px; width: 32px; height: 32px; background: #f4eadb; color: #977657; }
  .ati-close:hover { background: #f6e5d3; color: #9e492a; }
  .ati-panel-title { font-size: 32px; margin-bottom: 25px; }
  .ati-login-hint { margin: -13px 0 24px; font-size: 13px; }
  .ati-panel-description { font-size: 15px; margin-top: -10px; }
  .ati-auth .auth-input { min-height: 60px; font-size: 17px; padding-top: 15px; padding-bottom: 15px; }
  .ati-auth .auth-input::placeholder { font-size: 16px; }
  .ati-auth .auth-label { font-size: 16px; }
  .ati-auth .ati-google-button, .ati-auth .auth-primary-btn { min-height: 60px; font-size: 17px; }
  .ati-google-slot { min-height: 60px; }
  .ati-entry-divider { margin: 22px 0; }
  .ati-get-code { margin-top: 18px; }
  .ati-auth .ati-bot-action { padding: 11px 12px; gap: 10px; }
  .ati-bot-action > img { width: 34px; height: 34px; flex-basis: 34px; }
  .ati-bot-action strong { font-size: 15px; }
  .ati-bot-action small { font-size: 12px; }
  .ati-bot-action > svg { display: none; }
  .ati-qr-option { flex-basis: 66px; }
  .ati-qr-option > summary { padding: 8px; min-height: 70px; }
  .ati-terms { margin-top: 16px; font-size: 13px; }
  .ati-auth .auth-row { flex-wrap: wrap; }
}
@media (max-width: 370px) {
  .ati-auth-page .auth-page { padding: 16px 10px; }
  .ati-auth-content, .ati-login-modal .ati-auth-content { padding: 26px 18px 20px; }
  .ati-close { top: 23px; right: 16px; }
  .ati-panel-title { font-size: 30px; }
  .ati-auth .ati-google-button, .ati-auth .auth-primary-btn { min-height: 58px; font-size: 16px; padding: 14px; }
  .ati-auth .auth-input { min-height: 58px; font-size: 16px; }
  .ati-auth .auth-input::placeholder { font-size: 15px; }
  .ati-code-actions { gap: 8px; }
  .ati-auth .ati-bot-action { padding: 10px; gap: 8px; }
  .ati-bot-action > img { width: 28px; height: 28px; flex-basis: 28px; }
  .ati-bot-action strong { font-size: 15px; }
  .ati-qr-option { flex-basis: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .ati-auth :is(button, a, input, summary > svg) { transition: none; }
}
