/* =====================================================================
   Hoàn thiện tài khoản (v6.17.0) — thẻ ở trang Hồ sơ + nút / hộp "Đăng nhập bằng Telegram".
   Dùng biến màu của theme (--primary, --surface, --surface-2, --heading, --text, --border) nên giao diện tối tự khớp;
   dark.css tô mọi span / p / a ⇒ phần cuối file ghi đè lại bằng html[data-theme="dark"] .ac-*.
   ===================================================================== */
.ac-head-progress { font-size: 13px; font-weight: 600; color: var(--text, #666); white-space: nowrap; }
.ac-head-progress b { color: var(--primary, #002594); }
.ac-lead { margin: -10px 0 16px; font-size: 14.5px; line-height: 1.55; color: var(--text, #555); }

.ac-rows { display: grid; gap: 10px; }
.ac-row {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border: 1px solid var(--border, #e8e8e8); border-radius: 12px; background: var(--surface, #fff);
}
.ac-row.ac-done { background: var(--surface-2, #f7f8fb); }
.ac-ic {
    flex: none; width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--primary, #002594) 10%, transparent); color: var(--primary, #002594);
}
.ac-ic svg { width: 21px; height: 21px; }
.ac-body { flex: 1; min-width: 0; }
.ac-name { font-weight: 700; font-size: 15px; color: var(--heading, #39404a); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-sub { font-size: 13.5px; color: var(--text, #666); margin-top: 2px; overflow-wrap: anywhere; }
.ac-badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; line-height: 1.5; }
.ac-badge-ok { background: #e7f7ee; color: #127a3e; }
.ac-badge-warn { background: #fff4e0; color: #9a5b00; }
.ac-actions { flex: none; display: flex; align-items: center; gap: 10px; }
.ac-btn {
    border: 0; border-radius: 9px; padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
    background: var(--primary, #002594); color: #fff; transition: filter .15s;
}
.ac-btn:hover { filter: brightness(1.08); }
.ac-link { border: 0; background: none; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--primary, #002594); cursor: pointer; }
.ac-link:hover { text-decoration: underline; }
.ac-link-muted { color: var(--text, #777); font-weight: 500; }

.ac-promo { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border, #e2e2e2); }
.ac-promo-title { font-size: 14.5px; font-weight: 700; color: var(--heading, #39404a); margin-bottom: 8px; }
.ac-promo-list { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.ac-promo-note { display: block; margin-top: 8px; font-size: 13px; color: var(--text, #777); }

/* Công tắc */
.ac-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; color: var(--heading, #39404a); margin: 0; }
.ac-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ac-switch .ac-track {
    position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--gray-chalk, #cfd4dc); transition: background .15s; flex: none;
}
.ac-switch .ac-track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.ac-switch input:checked + .ac-track { background: var(--primary, #002594); }
.ac-switch input:checked + .ac-track::after { transform: translateX(18px); }
.ac-switch input:focus-visible + .ac-track { outline: 2px solid var(--primary, #002594); outline-offset: 2px; }
.ac-switch input:disabled + .ac-track { opacity: .45; }
.ac-switch.is-disabled { cursor: not-allowed; color: var(--text, #888); }

/* Hộp Swal: liên kết / đăng nhập Telegram, xác minh email */
.ac-modal { text-align: left; font-size: 14.5px; line-height: 1.55; color: var(--text, #555); }
.ac-modal p { margin: 0 0 10px; }
.ac-modal .ac-field { width: 100%; height: 44px; border: 1px solid var(--border, #dcdfe5); border-radius: 10px; padding: 0 12px; font-size: 15px; background: var(--surface, #fff); color: var(--heading, #39404a); margin-bottom: 10px; }
.ac-modal .ac-field:focus { outline: 0; border-color: var(--primary, #002594); }
.ac-modal .ac-code { text-align: center; font-size: 24px; letter-spacing: 8px; font-weight: 700; }
.ac-modal .ac-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0 2px; color: var(--heading, #39404a); cursor: pointer; }
.ac-modal .ac-check input { margin-top: 3px; }
.ac-modal .ac-benefits { margin: 0 0 12px; padding: 0; list-style: none; }
.ac-modal .ac-benefits li { position: relative; margin-bottom: 4px; padding-left: 22px; }
.ac-modal .ac-benefits li::before { content: "✓"; position: absolute; left: 2px; top: 0; font-weight: 700; color: #16a34a; }
/* "Gửi lại mã" (nút deny của Swal mặc định đỏ — trông như thao tác nguy hiểm) ⇒ kiểu link */
.swal2-styled.ac-swal-link, .swal2-styled.ac-swal-link:focus { background: transparent !important; color: var(--primary, #002594) !important; box-shadow: none !important; }
.swal2-styled.ac-swal-link:hover { text-decoration: underline; background-image: none !important; }
html[data-theme="dark"] .swal2-styled.ac-swal-link { color: #8fb0ff !important; }
.ac-tg { text-align: center; }
.ac-tg .ac-qr { display: block; width: 188px; height: 188px; margin: 4px auto 12px; border-radius: 12px; background: #fff; padding: 8px; border: 1px solid var(--border, #e2e2e2); }
.ac-tg .ac-qr-hint { font-size: 13px; color: var(--text, #777); margin-bottom: 12px; }
.ac-tg-open {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 11px;
    background: #229ED9; color: #fff !important; font-weight: 600; font-size: 15px; text-decoration: none;
}
.ac-tg-open:hover { filter: brightness(1.07); color: #fff; }
.ac-tg-open svg { width: 18px; height: 18px; }
.ac-status { margin-top: 14px; font-size: 14px; color: var(--text, #666); display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 22px; }
.ac-status.is-bad { color: #c0392b; }
.ac-status.is-ok { color: #127a3e; }
.ac-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: ac-pulse 1.2s ease-in-out infinite; }
@keyframes ac-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ac-dot { animation: none; } }

/* Nút "Đăng nhập bằng Telegram" ở trang Đăng nhập */
.ac-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--text, #888); font-size: 13px; }
.ac-or::before, .ac-or::after { content: ""; flex: 1; height: 1px; background: var(--border, #e0e0e0); }
.ac-tg-login {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; border-radius: 8px;
    border: 1px solid #229ED9; background: transparent; color: #1c8cc4; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.ac-tg-login:hover { background: color-mix(in srgb, #229ED9 9%, transparent); }
.ac-tg-login svg { width: 20px; height: 20px; }
.ac-alt-help { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2, #f5f7fb); font-size: 14px; color: var(--text, #555); }
.ac-alt-help a { color: #1c8cc4; font-weight: 600; }

@media (max-width: 575px) {
    .ac-row { flex-wrap: wrap; padding: 12px; gap: 12px; }
    .ac-actions { width: 100%; justify-content: flex-end; }
    .ac-tg .ac-qr, .ac-tg .ac-qr-hint { display: none; }
}

/* Giao diện tối */
html[data-theme="dark"] .ac-badge-ok { background: #10331f; color: #9fe6bd; }
html[data-theme="dark"] .ac-badge-warn { background: #3a2a10; color: #f4c77d; }
html[data-theme="dark"] .ac-ic { color: #8fb0ff; background: rgba(143, 176, 255, .12); }
html[data-theme="dark"] .ac-head-progress b,
html[data-theme="dark"] .ac-link,
html[data-theme="dark"] .ac-alt-help a { color: #8fb0ff; }
html[data-theme="dark"] .ac-link-muted { color: var(--gray, #aeb4bf); }
html[data-theme="dark"] .ac-btn { color: #fff; }
html[data-theme="dark"] .ac-tg-login { color: #6cc4f0; border-color: #2b8fc2; }
html[data-theme="dark"] .ac-switch input:checked + .ac-track { background: #4f7bff; }
html[data-theme="dark"] .ac-status.is-bad { color: #ff8a80; }
html[data-theme="dark"] .ac-status.is-ok { color: #9fe6bd; }
html[data-theme="dark"] .ac-modal .ac-field { background: var(--surface-2); color: var(--heading); }
