/* =========================================================
   VELAEA Account Center - Dashboard Theme
   Scope: account.html only
========================================================= */
:root{
  --bg:#020814;
  --bg2:#06111f;
  --sidebar:#04101f;
  --panel:#0a1625;
  --panel2:#071321;
  --gold:#f2c76a;
  --gold2:#c8952e;
  --text:#f7fbff;
  --muted:#9fb0c3;
  --line:rgba(242,199,106,.16);
  --line2:rgba(255,255,255,.08);
  --green:#58d878;
  --red:#ff6868;
  --radius:18px;
  --shadow:0 22px 60px rgba(0,0,0,.32);
}

.account-page *{box-sizing:border-box}
.account-page{
  margin:0;
  min-height:100vh;
  color:var(--text);
  font-family:Inter,'Noto Sans Thai',Arial,sans-serif;
  background:
    radial-gradient(circle at 78% 0,rgba(242,199,106,.09),transparent 28%),
    linear-gradient(180deg,#020814,#06111f 54%,#020814);
}
.account-page a{text-decoration:none;color:inherit}
.account-page button,.account-page input,.account-page select,.account-page textarea{font-family:inherit}

.account-page .app{min-height:100vh;display:grid;grid-template-columns:250px 1fr}
.account-page .sidebar{
  position:sticky;top:0;height:100vh;overflow:auto;padding:22px 0;
  background:linear-gradient(180deg,#03101f 0%,#06111f 55%,#020814 100%);
  border-right:1px solid var(--line);
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.account-page .sidebar::-webkit-scrollbar{
  width:0;
  height:0;
}
.account-page .brand{display:flex;align-items:center;padding:0 24px 22px;border-bottom:1px solid rgba(255,255,255,.06);margin-bottom:16px}
.account-page .brand img{width:166px;height:auto;filter:drop-shadow(0 12px 24px rgba(242,199,106,.14))}
.account-page .nav-title{padding:0 24px;margin:22px 0 10px;font-size:11px;font-weight:900;letter-spacing:.14em;color:#708398}
.account-page .nav{display:grid;gap:2px}
.account-page .nav a,.account-page .nav-logout{
  position:relative;display:block;width:100%;text-align:left;padding:15px 24px;color:#dce7f5;
  font-size:14px;font-weight:900;letter-spacing:.01em;border:0;border-left:3px solid transparent;background:transparent;cursor:pointer;
  transition:.18s ease;
}
.account-page .nav a.active,.account-page .nav a:hover,.account-page .nav-logout:hover{
  color:#fff;background:linear-gradient(90deg,rgba(242,199,106,.14),rgba(242,199,106,.02));border-left-color:var(--gold);
}
.account-page .nav-logout{color:#ffb5b5;margin-top:6px}
.account-page .upgrade{margin:28px 20px 0;padding:18px;border:1px solid rgba(242,199,106,.22);border-radius:16px;background:radial-gradient(circle at 50% 0,rgba(242,199,106,.16),transparent 45%),rgba(255,255,255,.025)}
.account-page .upgrade h3{margin:0 0 6px;font-size:14px;letter-spacing:.04em}
.account-page .upgrade p{margin:0 0 14px;color:var(--muted);font-size:12px;line-height:1.55}

.account-page .main{min-width:0}
.account-page .topbar{
  position:sticky;top:0;z-index:20;height:72px;display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:0 28px;background:rgba(2,8,20,.88);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(242,199,106,.13);
}
.account-page .top-left,.account-page .top-actions{display:flex;align-items:center;gap:16px;min-width:0}
.account-page .top-left{flex:1 1 auto;overflow:hidden}
.account-page .top-actions{flex:0 0 auto;gap:10px;min-width:max-content}
.account-page .page-title{font-size:16px;font-weight:950;letter-spacing:.01em;white-space:nowrap}
.account-page .top-nav{display:flex;align-items:center;gap:2px;min-width:0;overflow:hidden}
.account-page .top-nav a{position:relative;padding:10px 10px;color:#b9c9dc;font-size:13px;font-weight:900;white-space:nowrap}
.account-page .top-nav a.active,.account-page .top-nav a:hover{color:var(--gold)}
.account-page .top-nav a.active:after{content:"";position:absolute;left:10px;right:10px;bottom:3px;height:2px;border-radius:999px;background:linear-gradient(90deg,var(--gold),rgba(242,199,106,0))}
.account-page .menu-btn{display:none;width:42px;height:42px;border:1px solid rgba(242,199,106,.18);border-radius:14px;background:rgba(255,255,255,.045);cursor:pointer;place-items:center;padding:10px}
.account-page .menu-btn span{display:block;width:18px;height:2px;border-radius:99px;background:var(--gold);margin:3px auto;transition:.18s ease}
.account-page .icon-btn,.account-page .btn{
  min-height:42px;border:1px solid rgba(242,199,106,.18);background:rgba(255,255,255,.045);color:#f7fbff;
  border-radius:13px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:13px;font-weight:950;cursor:pointer;
  flex:0 0 auto;white-space:nowrap;
}
.account-page .btn-gold{border:0;background:linear-gradient(135deg,#ffdd86,#c8952e);color:#1d1205;box-shadow:0 16px 34px rgba(200,149,46,.18)}
.account-page .btn-full{width:100%}
.account-page .user{display:flex;align-items:center;gap:10px;padding:6px 12px;border:1px solid rgba(242,199,106,.14);background:rgba(255,255,255,.035);border-radius:15px;min-width:112px;max-width:172px;flex:0 0 auto;overflow:hidden}
.account-page .user>div:last-child{min-width:0;display:grid;gap:1px}
.account-page .user strong{display:block;font-size:13px;line-height:1.2;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-page .user span{display:block;margin-top:2px;color:var(--muted);font-size:11px;font-weight:850}
.account-page .avatar{width:34px;height:34px;min-width:34px;flex:0 0 34px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,#ffd978,#c8952e);color:#1d1205;font-weight:950}

.account-page .content{padding:24px 28px 34px;max-width:1380px;margin:0 auto;width:100%}
.account-page .welcome,.account-page .panel{
  border:1px solid var(--line);border-radius:24px;background:linear-gradient(180deg,rgba(10,22,37,.96),rgba(7,17,31,.92));
  box-shadow:var(--shadow);overflow:hidden;
}
.account-page .welcome{padding:28px;margin-bottom:18px}
.account-page .eyebrow{margin:0 0 8px;color:var(--gold);font-size:12px;font-weight:950;letter-spacing:.17em;text-transform:uppercase}
.account-page .welcome h1,.account-page .account-hero h1{margin:0;font-size:clamp(34px,4vw,54px);line-height:1.04;letter-spacing:-.045em}
.account-page .welcome p{color:var(--muted);line-height:1.65;max-width:820px}
.account-page .panel{margin-bottom:18px}
.account-page .panel-pad{padding:20px}
.account-page .panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.account-page .panel-head h2{margin:0;font-size:18px;font-weight:950;letter-spacing:-.015em}
.account-page .panel-link{color:var(--muted);font-size:12px;font-weight:900}

.account-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,360px);gap:22px;align-items:center}
.account-status-card{min-height:126px;border:1px solid rgba(242,199,106,.18);border-radius:22px;padding:22px;background:linear-gradient(135deg,rgba(255,255,255,.055),rgba(242,199,106,.055));box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.account-status-card span,.account-mini-card span{display:block;color:var(--muted);font-size:12px;line-height:1.35;font-weight:950;letter-spacing:.04em;text-transform:uppercase}
.account-status-card strong{display:block;margin-top:9px;color:#fff;font-size:22px;line-height:1.18;font-weight:950}
.account-status-card small,.account-mini-card small{display:block;margin-top:6px;color:var(--muted);font-size:12px;line-height:1.45;font-weight:800}
.account-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.account-mini-card{min-height:116px;padding:20px;margin:0}
.account-mini-card strong{display:block;margin-top:9px;color:#fff;font-size:21px;line-height:1.15;font-weight:950;word-break:break-word}
.account-layout-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(340px,.95fr);gap:18px;align-items:start}

.account-page .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.account-page label{display:block;margin:0 0 7px;color:var(--muted);font-size:12px;font-weight:950}
.account-page input,.account-page select,.account-page textarea{
  width:100%;min-height:44px;border:1px solid rgba(242,199,106,.16);background:#06111f;color:#fff;border-radius:13px;padding:12px 13px;
  font-weight:850;outline:0;transition:.18s ease;
}
.account-page textarea{min-height:92px;resize:vertical}
.account-page input:focus,.account-page select:focus,.account-page textarea:focus{border-color:rgba(242,199,106,.48);box-shadow:0 0 0 4px rgba(242,199,106,.08)}
.account-page input:disabled{opacity:.72;cursor:not-allowed;background:rgba(255,255,255,.035)}
.account-form-grid.single{grid-template-columns:1fr}
.account-actions-row{grid-column:1/-1;display:flex;align-items:center;justify-content:flex-end;gap:10px}
.account-divider{height:1px;background:rgba(255,255,255,.08);margin:18px 0}
.account-mt5-form{grid-template-columns:repeat(4,minmax(0,1fr))}
.account-note-field{grid-column:1/-1}
.account-mt5-actions{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.account-check{display:inline-flex!important;align-items:center;gap:9px;color:var(--muted);font-size:13px;font-weight:900;margin:0!important}
.account-check input{width:auto!important;min-height:auto!important;accent-color:var(--gold)}

.account-page .table-wrap{overflow:auto;border:1px solid rgba(255,255,255,.07);border-radius:18px;background:rgba(255,255,255,.025)}
.account-table-wrap{margin-top:18px}
.account-page table{width:100%;border-collapse:collapse;min-width:760px}
.account-page th,.account-page td{padding:13px 12px;border-bottom:1px solid rgba(255,255,255,.07);font-size:13px;text-align:left;vertical-align:top}
.account-page th{color:var(--muted);font-weight:950}
.account-page tr:last-child td{border-bottom:0}
.account-table-wrap .btn{min-height:34px;padding:8px 10px;font-size:12px;margin:2px}
.account-loading,.account-error{color:var(--muted);font-weight:850}
.account-error,.account-content .btn-red{color:#ffb5b5!important}
.account-content .btn-red{border-color:rgba(255,104,104,.28)!important;background:rgba(255,104,104,.085)!important}
.account-content .gold{color:var(--gold);font-weight:950}
.account-content .muted{color:var(--muted)}
.account-content .status-pill{display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;border-radius:999px;border:1px solid rgba(242,199,106,.22);background:rgba(242,199,106,.10);color:var(--gold);font-size:11px;line-height:1;font-weight:950;text-transform:uppercase;letter-spacing:.06em}

.account-page .sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(2,8,20,.58);backdrop-filter:blur(6px);z-index:30}

html[data-theme="light"] .account-page,
.account-page.light-mode{--bg:#f5f8fc;--bg2:#fff;--sidebar:#fff;--panel:#fff;--panel2:#f7fafe;--text:#061a2f;--muted:#5e6f84;--line:rgba(200,149,46,.18);--line2:rgba(6,26,47,.09);background:linear-gradient(180deg,#f6f8fc,#edf3fa 55%,#fff);color:#061a2f}
html[data-theme="light"] .account-page .sidebar,
.account-page.light-mode .sidebar{background:linear-gradient(180deg,#fff,#f7fafe);border-right-color:rgba(200,149,46,.18)}
html[data-theme="light"] .account-page .topbar,
.account-page.light-mode .topbar{background:rgba(255,255,255,.86);border-bottom-color:rgba(200,149,46,.18)}
html[data-theme="light"] .account-page .welcome,
html[data-theme="light"] .account-page .panel,
.account-page.light-mode .welcome,
.account-page.light-mode .panel{background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,255,.94));box-shadow:0 22px 60px rgba(8,24,42,.08)}
html[data-theme="light"] .account-page input,
html[data-theme="light"] .account-page select,
html[data-theme="light"] .account-page textarea,
.account-page.light-mode input,
.account-page.light-mode select,
.account-page.light-mode textarea{background:#fff;color:#061a2f;border-color:rgba(200,149,46,.24)}
html[data-theme="light"] .account-status-card,
.account-page.light-mode .account-status-card{background:linear-gradient(135deg,rgba(255,255,255,.82),rgba(242,199,106,.10));border-color:rgba(200,149,46,.22)}
html[data-theme="light"] .account-status-card strong,
html[data-theme="light"] .account-mini-card strong,
.account-page.light-mode .account-status-card strong,
.account-page.light-mode .account-mini-card strong{color:#061a2f!important}

@media(max-width:1360px){
  .account-page .topbar{padding:0 20px;gap:10px}
  .account-page .top-left{gap:12px}
  .account-page .top-actions{gap:8px}
  .account-page .top-nav{display:none}
  .account-page .theme-toggle{width:42px;min-width:42px;padding:0}
  .account-page .theme-toggle .theme-text{display:none!important}
  .account-page .language-switcher{flex:0 0 auto}
  .account-page .lang-trigger{max-width:142px;padding:0 10px}
  .account-page .user{min-width:112px}
}

@media(max-width:1240px){
  .account-page .topbar{padding:0 16px}
  .account-page .lang-trigger{width:44px;min-width:44px;padding:0}
  .account-page .lang-current-text,
  .account-page .lang-chevron{display:none!important}
  .account-page .user{min-width:96px;max-width:132px;padding:6px 10px}
  .account-page .user strong{max-width:64px}
}

@media(max-width:1180px){
  .account-page .app{grid-template-columns:1fr}
  .account-page .sidebar{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:0!important;
    width:min(82vw,292px)!important;
    max-width:292px!important;
    height:100dvh!important;
    z-index:1002!important;
    transform:translateX(-106%)!important;
    transition:transform .24s cubic-bezier(.22,.8,.24,1), box-shadow .24s ease!important;
    box-shadow:none!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  .account-page.sidebar-open .sidebar,
  body.sidebar-open .account-page .sidebar,
  body.sidebar-open .sidebar,
  .account-page .sidebar.open{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    transform:translateX(0)!important;
    box-shadow:28px 0 72px rgba(0,0,0,.45)!important;
    pointer-events:auto!important;
  }
  .account-page:not(.sidebar-open) .sidebar:not(.open){
    pointer-events:none;
  }
  .account-page .sidebar-backdrop{
    display:block!important;
    position:fixed!important;
    inset:0!important;
    z-index:1001!important;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .2s ease, visibility .2s ease;
  }
  .account-page.sidebar-open .sidebar-backdrop,
  body.sidebar-open .sidebar-backdrop{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .account-page .menu-btn{display:grid!important}
  .account-page .menu-btn.is-open span:nth-child(1),
  .account-page.sidebar-open .menu-btn span:nth-child(1){transform:translateY(5px) rotate(45deg)}
  .account-page .menu-btn.is-open span:nth-child(2),
  .account-page.sidebar-open .menu-btn span:nth-child(2){opacity:0}
  .account-page .menu-btn.is-open span:nth-child(3),
  .account-page.sidebar-open .menu-btn span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}
  .account-page .top-nav{display:none}
  .account-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .account-layout-grid{grid-template-columns:1fr}
  .account-mt5-form{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .account-page .topbar{height:66px;padding:0 12px}
  .account-page .content{padding:14px 12px 26px}
  .account-page .account-top-user strong,.account-page .account-top-user span,.account-page #logoutBtn,.account-page .theme-text,.account-page .lang-current-text,.account-page .lang-chevron{display:none!important}
  .account-page .icon-btn,.account-page .lang-trigger,.account-page .menu-btn{width:40px!important;min-width:40px!important;height:40px!important;padding:0!important}
  .account-hero-grid{grid-template-columns:1fr}
  .account-status-card{min-height:auto;padding:18px;border-radius:18px}
  .account-kpi-grid{grid-template-columns:1fr;gap:12px}
  .account-mini-card{min-height:auto;padding:16px}
  .account-page .form-grid,.account-mt5-form{grid-template-columns:1fr}
  .account-actions-row,.account-mt5-actions{justify-content:stretch;align-items:stretch}
  .account-actions-row .btn,.account-mt5-actions .btn{width:100%}
  .account-check{justify-content:flex-start}
  .account-table-wrap table{min-width:760px}
}
@media(max-width:420px){
  .account-page .page-title{max-width:126px;overflow:hidden;text-overflow:ellipsis}
  .account-page .welcome{padding:20px!important;border-radius:20px}
  .account-page .welcome h1{font-size:30px!important}
}


/* =========================================================
   VELAEA Account Mobile Menu Button Sync
   ใช้รูปแบบปุ่มสามขีดเดียวกับ dashboard.html ในมือถือ
   ========================================================= */
@media (max-width:900px){
  body.account-page .menu-btn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-direction:column!important;
    gap:4px!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    padding:0!important;
    margin:0!important;
    border-radius:13px!important;
    border:1px solid rgba(242,199,106,.34)!important;
    background:rgba(255,255,255,.065)!important;
    box-shadow:0 10px 22px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.06)!important;
    cursor:pointer!important;
    line-height:1!important;
    appearance:none!important;
    -webkit-appearance:none!important;
  }

  body.account-page .menu-btn span{
    display:block!important;
    flex:0 0 auto!important;
    width:18px!important;
    height:2px!important;
    min-height:2px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:999px!important;
    background:#f2c76a!important;
    box-shadow:0 0 8px rgba(242,199,106,.35)!important;
    opacity:1!important;
    transform:none;
    transition:transform .22s ease, opacity .22s ease, background .22s ease!important;
  }

  html[data-theme="light"] body.account-page .menu-btn,
  body.account-page.light-mode .menu-btn{
    background:rgba(255,255,255,.92)!important;
    border-color:rgba(200,149,46,.28)!important;
    box-shadow:0 10px 22px rgba(8,24,42,.08)!important;
  }

  html[data-theme="light"] body.account-page .menu-btn span,
  body.account-page.light-mode .menu-btn span{
    background:#061a2f!important;
    box-shadow:none!important;
  }

  body.account-page.sidebar-open .menu-btn,
  body.account-page .menu-btn.is-open{
    background:linear-gradient(135deg,#ffd978,#c8952e)!important;
    border-color:rgba(242,199,106,.58)!important;
  }

  body.account-page.sidebar-open .menu-btn span,
  body.account-page .menu-btn.is-open span{
    background:#1d1205!important;
    box-shadow:none!important;
  }

  body.account-page.sidebar-open .menu-btn span:nth-child(1),
  body.account-page .menu-btn.is-open span:nth-child(1){
    transform:translateY(6px) rotate(45deg)!important;
  }

  body.account-page.sidebar-open .menu-btn span:nth-child(2),
  body.account-page .menu-btn.is-open span:nth-child(2){
    opacity:0!important;
  }

  body.account-page.sidebar-open .menu-btn span:nth-child(3),
  body.account-page .menu-btn.is-open span:nth-child(3){
    transform:translateY(-6px) rotate(-45deg)!important;
  }
}

/* =========================================================
   VELAEA Member Profile & Localization
   Profile photo, country flag, timezone settings
========================================================= */
.account-profile-localization-form .account-avatar-manager,
.account-profile-localization-form .account-localization-summary{
  grid-column:1/-1;
}
.account-avatar-manager{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:16px;
  align-items:center;
  padding:16px;
  border:1px solid rgba(242,199,106,.16);
  border-radius:20px;
  background:linear-gradient(135deg,rgba(255,255,255,.045),rgba(242,199,106,.045));
}
.account-avatar-preview{
  width:96px;
  height:96px;
  border-radius:28px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid rgba(242,199,106,.35);
  background:linear-gradient(135deg,#ffd978,#c8952e);
  color:#1d1205;
  font-size:34px;
  font-weight:1000;
  box-shadow:0 16px 44px rgba(200,149,46,.18);
}
.account-avatar-preview img,
.account-top-user .avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.account-top-user .avatar.has-image{
  padding:0!important;
  overflow:hidden;
  border:1px solid rgba(242,199,106,.38);
  background:rgba(255,255,255,.06)!important;
}
.account-avatar-copy strong{display:block;color:#fff;font-size:16px;font-weight:950;margin-bottom:3px}
.account-avatar-copy span{display:block;color:var(--muted);font-size:12px;font-weight:800;line-height:1.55}
.account-avatar-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}
.account-upload-btn{cursor:pointer;margin:0!important}
#avatarUploadNote{display:block;margin-top:8px;color:var(--muted);font-size:11px;font-weight:800}
.account-country-select-wrap{
  display:grid;
  grid-template-columns:48px 1fr;
  gap:10px;
  align-items:center;
}
.account-flag-preview,
.account-summary-flag{
  display:grid;
  place-items:center;
  border-radius:14px;
  border:1px solid rgba(242,199,106,.18);
  background:rgba(255,255,255,.045);
  overflow:hidden;
}
.account-flag-preview{height:44px}
.account-flag-preview img,
.account-summary-flag img{width:28px;height:28px;object-fit:cover;border-radius:999px}
.account-field-hint{display:block;margin-top:7px;color:var(--muted);font-size:11px;font-weight:800;line-height:1.45}
.account-localization-summary{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:14px;
  border:1px solid rgba(100,215,255,.12);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(100,215,255,.055),rgba(242,199,106,.035));
}
.account-localization-summary strong{display:block;color:#fff;font-size:14px;font-weight:950;line-height:1.3}
.account-localization-summary small{display:block;margin-top:3px;color:var(--muted);font-size:11px;font-weight:800;line-height:1.45}
.account-summary-flag{width:42px;height:42px}
html[data-theme="light"] .account-avatar-copy strong,
html[data-theme="light"] .account-localization-summary strong,
.account-page.light-mode .account-avatar-copy strong,
.account-page.light-mode .account-localization-summary strong{color:#061a2f!important}
html[data-theme="light"] .account-avatar-manager,
html[data-theme="light"] .account-localization-summary,
.account-page.light-mode .account-avatar-manager,
.account-page.light-mode .account-localization-summary{background:linear-gradient(135deg,rgba(255,255,255,.86),rgba(242,199,106,.09));border-color:rgba(200,149,46,.20)}
html[data-theme="light"] .account-flag-preview,
html[data-theme="light"] .account-summary-flag,
.account-page.light-mode .account-flag-preview,
.account-page.light-mode .account-summary-flag{background:#fff;border-color:rgba(200,149,46,.22)}
@media(max-width:760px){
  .account-avatar-manager{grid-template-columns:1fr;justify-items:start}
  .account-avatar-preview{width:82px;height:82px;border-radius:24px;font-size:30px}
  .account-localization-summary{grid-template-columns:auto 1fr}
  .account-localization-summary .btn{grid-column:1/-1;width:100%}
}

/* =========================================================
   VELAEA Account Center — mobile shell parity patch 2026-07-10
   Aligns Account mobile header/content with Dashboard shell.
   ========================================================= */
@media (max-width: 980px) {
  html,
  body.account-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body.account-page .app,
  body.account-page .main,
  body.account-page main.main {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.account-page .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 900 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 62px !important;
    min-height: 62px !important;
    padding: 0 10px !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  body.account-page .top-left {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  body.account-page .top-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    min-width: 0 !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }

  body.account-page .page-title {
    display: inline-flex !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: min(150px, 42vw) !important;
    height: 34px !important;
    padding: 0 11px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 13px !important;
    line-height: 1 !important;
  }

  body.account-page .menu-btn,
  body.account-page .icon-btn,
  body.account-page .lang-trigger,
  body.account-page .account-top-user {
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 13px !important;
  }

  body.account-page .account-top-user {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  body.account-page .account-top-user img,
  body.account-page .top-user-avatar,
  body.account-page .profile-avatar {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 11px !important;
    object-fit: cover !important;
  }

  body.account-page .account-top-user strong,
  body.account-page .account-top-user span,
  body.account-page #logoutBtn,
  body.account-page .theme-text,
  body.account-page .lang-current-text,
  body.account-page .lang-chevron,
  body.account-page .notification-label,
  body.account-page .notification-text {
    display: none !important;
  }

  body.account-page .content,
  body.account-page .account-content {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 12px 10px 28px !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }

  body.account-page .welcome,
  body.account-page .account-hero,
  body.account-page .account-section,
  body.account-page .account-panel {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.account-page .welcome {
    padding: 18px 16px !important;
    border-radius: 18px !important;
  }

  body.account-page .welcome h1 {
    font-size: clamp(26px, 7vw, 32px) !important;
    line-height: 1.12 !important;
    margin-bottom: 10px !important;
  }

  body.account-page .welcome p {
    font-size: 13px !important;
    line-height: 1.65 !important;
  }

  body.account-page .account-hero-grid,
  body.account-page .account-kpi-grid,
  body.account-page .account-layout-grid,
  body.account-page .form-grid,
  body.account-page .account-mt5-form {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  body.account-page .account-status-card,
  body.account-page .account-mini-card,
  body.account-page .account-card {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 15px !important;
    border-radius: 16px !important;
  }

  body.account-page .account-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.account-page .sidebar {
    max-width: min(86vw, 320px) !important;
  }

  body.account-page #velaeaChatWidget,
  body.account-page .velaea-chat-widget {
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }

  body.account-page #velaeaChatWidget button,
  body.account-page .velaea-chat-launcher,
  body.account-page .velaea-chat-toggle {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
  }

  body.account-page {
    scrollbar-width: thin;
  }

  body.account-page::-webkit-scrollbar,
  body.account-page *::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }
}

@media (max-width: 420px) {
  body.account-page .topbar {
    padding-inline: 8px !important;
    gap: 6px !important;
  }

  body.account-page .top-left,
  body.account-page .top-actions {
    gap: 5px !important;
  }

  body.account-page .page-title {
    max-width: 126px !important;
    height: 32px !important;
    padding-inline: 9px !important;
    font-size: 12px !important;
  }

  body.account-page .content,
  body.account-page .account-content {
    padding-inline: 8px !important;
  }
}
