/* account.css — Trang tài khoản chung 27BigGroup (dang-nhap.php, index.php). Màu thương hiệu lấy từ logo. */
:root {
  --ink: #1f1a1c;
  --ink-2: #5c5358;
  --ink-3: #8d8388;
  --line: #ece4e7;
  --line-strong: #ddd2d7;
  --bg: #fbf7f8;
  --soft: #f6f0f2;
  --brand-1: #fd8e86;
  --brand-2: #fd4762;
  --brand-3: #fc2552;
  --brand-ink: #d81b45;
  --grad: linear-gradient(135deg, #fd8e86 0%, #fd4762 55%, #fc2552 100%);
  --danger: #c3223f;
  --danger-bg: #fff0f2;
  --info-ink: #6f4712;
  --info-bg: #fff6e8;
  --ok: #1d7f54;
  --ok-bg: #eaf7f0;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(31, 26, 28, .04), 0 18px 48px rgba(31, 26, 28, .08);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

.acct-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(253, 142, 134, .18), transparent 70%),
    radial-gradient(ellipse 50% 45% at 0% 100%, rgba(252, 37, 82, .07), transparent 70%),
    var(--bg);
}
a { color: var(--brand-ink); }
img { max-width: 100%; }
.ic { flex: none; width: 20px; height: 20px; }

/* ── Khung 2 cột: giới thiệu (desktop) + nội dung ─────────────────────── */
.acct-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-height: 100vh;
  padding: 16px;
}
@media (min-width: 960px) {
  .acct-shell { grid-template-columns: minmax(340px, 430px) minmax(0, 1fr); gap: 20px; padding: 20px; }
}

.acct-aside { display: none; }
@media (min-width: 960px) {
  .acct-aside {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    height: calc(100vh - 40px);
    min-height: 580px;
    padding: 34px 32px 24px;
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    background:
      radial-gradient(ellipse 85% 55% at 115% -10%, rgba(253, 71, 98, .55), transparent 62%),
      radial-gradient(ellipse 70% 45% at -25% 110%, rgba(253, 142, 134, .32), transparent 62%),
      #1c1619;
  }
}
.acct-aside__logo img { display: block; width: 160px; height: auto; }
/* Vòng dịch vụ 3D, thẻ, trang trí của cột trái: xem orbit.css */
.acct-aside__foot { margin: 0; color: rgba(255, 255, 255, .5); font-size: 13px; }

.acct-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 0;
  padding-block: 8px 24px;
}
.acct-mobile-logo img { display: block; width: 138px; height: auto; }
@media (min-width: 960px) { .acct-mobile-logo { display: none; } }

/* ── Thẻ nội dung ──────────────────────────────────────────────────────── */
.acct-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 440px;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}
.acct-card--wide { max-width: 560px; }

.acct-title { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; text-align: center; }
.acct-title--left { text-align: left; }
.acct-lead { margin: -10px 0 0; color: var(--ink-2); text-align: center; }
.acct-text { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.acct-badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 18px;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 24px rgba(252, 37, 82, .28);
}
.acct-badge .ic { width: 28px; height: 28px; }
.acct-context {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff2f4;
  color: var(--brand-ink);
  font-size: 14px;
}
.acct-context .ic { width: 18px; height: 18px; }
.acct-context b { color: var(--ink); }

.acct-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--soft); }
.acct-tab {
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.acct-tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(31, 26, 28, .12); }
.acct-tab:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.acct-oauth { display: flex; flex-direction: column; gap: 14px; }
.acct-divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.acct-divider::before, .acct-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── Nút ───────────────────────────────────────────────────────────────── */
.acct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 18px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, color .2s, opacity .2s;
}
.acct-btn:active { transform: translateY(1px); }
.acct-btn:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.acct-btn--primary { color: #fff; background: var(--grad); box-shadow: 0 8px 20px rgba(252, 37, 82, .24); }
.acct-btn--primary:hover { box-shadow: 0 10px 26px rgba(252, 37, 82, .34); }
.acct-btn--google, .acct-btn--ghost { color: var(--ink); background: #fff; border-color: var(--line-strong); }
.acct-btn--google:hover { border-color: #c9bcc2; background: #fcfafb; }
.acct-btn--ghost:hover { border-color: var(--brand-1); color: var(--brand-ink); }
.acct-btn--sm { flex: none; width: auto; min-height: 38px; padding: 6px 14px; font-size: 14px; }
.acct-btn--sm .ic { width: 18px; height: 18px; }
.acct-btn[disabled], .acct-btn.is-busy { opacity: .72; cursor: progress; }
.acct-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: acct-spin .7s linear infinite; }
@keyframes acct-spin { to { transform: rotate(360deg); } }

/* ── Form ──────────────────────────────────────────────────────────────── */
section[data-panel-name] { display: flex; flex-direction: column; gap: 14px; }
.acct-form { display: flex; flex-direction: column; gap: 14px; }
.acct-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.acct-field > span:first-child, .acct-field > label { font-size: 14px; font-weight: 600; }
.acct-field small { font-weight: 500; color: var(--ink-3); }
.acct-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.acct-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* dưới 16px Safari iOS tự phóng to trang khi chạm vào ô nhập → trang bị kéo trái/phải */
  transition: border-color .2s, box-shadow .2s;
}
.acct-field input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(253, 71, 98, .14); }
.acct-field input[aria-invalid="true"] { border-color: var(--danger); }
.acct-field .acct-code { padding-left: calc(14px + .5em); font-size: 26px; font-weight: 700; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.acct-password { position: relative; display: block; }
.acct-password input { padding-right: 50px; }
.acct-password__toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transform: translateY(-50%);
}
.acct-password__toggle:hover { background: var(--soft); color: var(--ink); }
.acct-password__toggle .ic--hide, .acct-password__toggle.is-shown .ic--show { display: none; }
.acct-password__toggle.is-shown .ic--hide { display: block; }
.acct-form__error { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-size: 14px; }
.acct-form__note { margin: 0; color: var(--ink-2); font-size: 14px; }
.acct-form__note b { color: var(--ink); overflow-wrap: anywhere; }
.acct-form__links { display: flex; justify-content: space-between; gap: 12px; }
.acct-link { padding: 0; border: 0; background: none; color: var(--brand-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.acct-link:hover { text-decoration: underline; }
.acct-link[disabled] { color: var(--ink-3); cursor: default; text-decoration: none; }
.acct-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin: 0 0 -2px -6px;
  padding: 4px 10px 4px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.acct-back:hover { background: var(--soft); color: var(--ink); }
.acct-back .ic { width: 18px; height: 18px; }

/* ── Thông báo ─────────────────────────────────────────────────────────── */
.acct-alert { display: flex; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-size: 14px; }
.acct-alert--info { background: var(--info-bg); color: var(--info-ink); }
.acct-alert .ic { width: 18px; height: 18px; margin-top: 2px; }
.acct-hint { margin: -4px 0 0; color: var(--ink-3); font-size: 13px; text-align: center; }
.acct-flash { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-size: 14px; }
.acct-note { max-width: 440px; margin: 0; color: var(--ink-3); font-size: 13px; text-align: center; }

/* ── Tài khoản đang đăng nhập ──────────────────────────────────────────── */
.acct-user { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fcfafb; }
.acct-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.acct-avatar--letter { display: grid; place-items: center; color: #fff; background: var(--grad); font-size: 18px; font-weight: 700; }
.acct-user__text { min-width: 0; }
.acct-user__text b, .acct-user__text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-user__text small { color: var(--ink-3); font-size: 13px; }
.acct-stack { display: flex; flex-direction: column; gap: 10px; }
.acct-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 14px; font-weight: 600; }
.acct-links a { text-decoration: none; }
.acct-links a:hover { text-decoration: underline; }

/* ── Trang tài khoản (index.php) ───────────────────────────────────────── */
.acct-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.acct-profile .acct-user { flex: 1 1 220px; padding: 0; border: 0; background: none; }
.acct-profile .acct-avatar { width: 56px; height: 56px; }
.acct-profile .acct-user__text b { font-size: 18px; }
.acct-h2 { margin: 8px 0 -4px; color: var(--ink-3); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.acct-methods, .acct-services { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.acct-methods li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; }
.acct-methods__icon, .acct-services__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #f7f0f2; color: var(--brand-ink); }
.acct-methods__text, .acct-services__text { flex: 1 1 140px; min-width: 0; }
.acct-methods__text b, .acct-services__text b { display: block; }
.acct-methods__text small, .acct-services__text small { display: block; color: var(--ink-3); font-size: 13px; }
.acct-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 600; }
.acct-pill .ic { width: 16px; height: 16px; }
.acct-services a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.acct-services a:hover { border-color: var(--brand-1); box-shadow: 0 8px 20px rgba(252, 37, 82, .1); transform: translateY(-1px); }
.acct-services__arrow { color: var(--ink-3); }

/* ── Tài khoản test — CHỈ máy local (php/dev_login.php, layout.php::acct_dev_panel) ──────── */
.acct-dev {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  padding: 16px;
  border: 1.5px dashed #e8b96a;
  border-radius: var(--radius-lg);
  background: #fffaf1;
}
.acct-dev__head { display: flex; align-items: center; gap: 8px; }
.acct-dev__badge { padding: 2px 8px; border-radius: 999px; background: #f5a524; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.acct-dev__title { margin: 0; font-size: 15px; font-weight: 800; }
.acct-dev__lead { margin: 0; color: var(--info-ink); font-size: 13px; line-height: 1.55; }
.acct-dev__lead code { padding: 1px 6px; border: 1px solid #f1dcb5; border-radius: 6px; background: #fff; font-size: 12.5px; }
.acct-dev__list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.acct-dev__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f1dcb5;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.acct-dev__item:hover { border-color: #e8a53c; box-shadow: 0 6px 16px rgba(180, 120, 20, .12); transform: translateY(-1px); }
.acct-dev__item:focus-visible { outline: 2px solid #e8a53c; outline-offset: 2px; }
.acct-dev__item.is-current { border-color: #e8a53c; box-shadow: inset 3px 0 0 #f5a524; }
.acct-dev__text { flex: 1; min-width: 0; }
.acct-dev__text b { display: block; font-size: 14px; }
.acct-dev__text small { display: block; color: var(--ink-3); font-size: 12.5px; overflow-wrap: anywhere; }
.acct-dev__arrow { flex: none; width: 18px; height: 18px; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
