/* Tài khoản JOUKYUU — /account/* */
:root {
  --bg: #F6F4FA; --surface: #FFFFFF; --surface-2: #F0EDF6; --text: #16141F; --muted: #5E5A70; --border: #E2DEEC;
  --accent: #E8407F; --accent-text: #FFFFFF; --ok-bg: #E7F6EE; --ok: #17643D; --err-bg: #FDECEF; --err: #A3203B;
  --warn-bg: #FFF4E5; --warn: #8A4B00; --focus: #9B5CF6;
  --grad: linear-gradient(45deg, #FF8A3D, #FF4D8D 50%, #9B5CF6);
  --radius: 14px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0C16; --surface: #17141F; --surface-2: #211D2C; --text: #F2F0F8; --muted: #A6A1B8; --border: #2C2839;
    --accent: #FF5C97; --accent-text: #16141F; --ok-bg: #12301F; --ok: #8FE0B0; --err-bg: #3A1520; --err: #FFA3B5;
    --warn-bg: #33240E; --warn: #FFC979; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 10px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 16px; max-width: 980px; width: 100%; margin: 0 auto; }
.brand img { display: block; height: 36px; width: auto; }
.brand .logo-dark { display: none; }
.main { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 8px 16px 48px; }
.main.wide { max-width: 980px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 16px 28px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; }
.card > .muted:first-of-type { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.right { align-self: flex-end; }

.form { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
.form label { display: block; font-weight: 600; font-size: 14px; }
.form label input { display: block; margin-top: 6px; }
.form label .small { font-weight: 400; }
input { font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; width: 100%; }
input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 600; cursor: pointer;
  border: 0; border-radius: 10px; padding: 12px 18px; background: var(--grad); color: #fff; text-decoration: none; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--err); color: #fff; }
.btn-provider { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-provider svg { width: 20px; height: 20px; }
.btn-provider:hover { background: var(--surface-2); filter: none; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.providers { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0 2px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.flash { padding: 11px 14px; border-radius: 10px; margin: 14px 0; font-size: 15px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.notice p { margin: 0; flex: 1 1 320px; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); margin-left: 6px; vertical-align: 1px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

.who { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; margin: 16px 0; }
.who img { border-radius: 50%; }

.profile-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 8px; }
.profile-head p { margin: 0; }
.avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.avatar.initial { display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 28px; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; min-width: 0; }
.panel .form { margin: 12px 0 18px; }
.panel .form:last-child { margin-bottom: 0; }
.panel .form .btn { align-self: flex-start; }
.methods, .sessions, .products { list-style: none; margin: 0 0 12px; padding: 0; }
.methods li, .sessions li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.methods form, .sessions form { flex: none; }
.products li a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--text); }
.products li a:hover { background: var(--surface-2); text-decoration: none; }
.products img { border-radius: 8px; }
.danger { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; }
.danger summary { cursor: pointer; font-weight: 600; color: var(--err); }
.hidden-frame { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }

@media (max-width: 480px) {
  .card { padding: 22px 16px; }
  h1 { font-size: 22px; }
}

@media (prefers-color-scheme: dark) {
  .brand .logo-light { display: none; }
  .brand .logo-dark { display: block; }
}
