/* Account page — premium redesign (APIs / balance hooks / routes untouched) */

html[data-theme="light"] .tf-account-page{
  --ac-bg:#E8EAE8;
  --ac-card:#FAFBFA;
  --ac-panel:#FFFFFF;
  --ac-border:#D5D8D5;
  --ac-text:#1A1F1C;
  --ac-muted:#66706A;
  --ac-soft:rgba(26,31,28,.045);
  --ac-green:#2F9E63;
  --ac-green-soft:rgba(47,158,99,.1);
  --ac-green-border:rgba(47,158,99,.22);
  --ac-shadow:0 12px 32px rgba(26,31,28,.07);
  --ac-ease:cubic-bezier(.22,1,.36,1);
  --ac-ok:#2F9E63;
  --ac-pending:#B8860B;
  --ac-bad:#C44B4B;
}
html[data-theme="dark"] .tf-account-page{
  --ac-bg:#121412;
  --ac-card:#1A1C1A;
  --ac-panel:#1E211E;
  --ac-border:rgba(255,255,255,.09);
  --ac-text:#E8ECE9;
  --ac-muted:#9AA39D;
  --ac-soft:rgba(255,255,255,.04);
  --ac-green:#4CAF78;
  --ac-green-soft:rgba(76,175,120,.12);
  --ac-green-border:rgba(76,175,120,.24);
  --ac-shadow:none;
  --ac-ease:cubic-bezier(.22,1,.36,1);
  --ac-ok:#4CAF78;
  --ac-pending:#D4A017;
  --ac-bad:#E07070;
}
.tf-account-page{
  --ac-bg:#E8EAE8;
  --ac-card:#FAFBFA;
  --ac-panel:#FFFFFF;
  --ac-border:#D5D8D5;
  --ac-text:#1A1F1C;
  --ac-muted:#66706A;
  --ac-soft:rgba(26,31,28,.045);
  --ac-green:#2F9E63;
  --ac-green-soft:rgba(47,158,99,.1);
  --ac-green-border:rgba(47,158,99,.22);
  --ac-shadow:0 12px 32px rgba(26,31,28,.07);
  --ac-ease:cubic-bezier(.22,1,.36,1);
  --ac-ok:#2F9E63;
  --ac-pending:#B8860B;
  --ac-bad:#C44B4B;
  position:relative;
  overflow-x:hidden;
  background:var(--ac-bg);
  color:var(--ac-text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  padding-top:72px;
  min-height:100vh;
}

html[data-theme="light"] body:has(.tf-account-page) .site-glow{
  background:linear-gradient(180deg,#F0F1F0,#E8EAE8 50%,#E0E2E0);
}
html[data-theme="dark"] body:has(.tf-account-page) .site-glow{
  background:
    radial-gradient(circle at 18% 8%,rgba(76,175,120,.08),transparent 32%),
    linear-gradient(180deg,#121412,#161816 55%,#121412);
}
html[data-theme="dark"] body:has(.tf-account-page) .tf-topbar.topbar,
html[data-theme="dark"] body:has(.tf-account-page) .tf-topbar.topbar.scrolled{
  background:#121412;
  border-bottom:1px solid rgba(255,255,255,.07);
}
html[data-theme="light"] body:has(.tf-account-page) .tf-topbar.topbar,
html[data-theme="light"] body:has(.tf-account-page) .tf-topbar.topbar.scrolled{
  background:#FAFBFA;
  border-bottom:1px solid rgba(23,23,23,.08);
}

.tf-account-atmosphere{
  pointer-events:none;
  position:absolute;
  inset:0;
  z-index:0;
  overflow:hidden;
}
.tf-account-orb{
  position:absolute;
  border-radius:50%;
  filter:blur(72px);
  opacity:.48;
}
.tf-account-orb-a{
  width:min(440px,55vw);height:min(440px,55vw);
  top:-8%;left:-10%;
  background:radial-gradient(circle,rgba(47,158,99,.28),transparent 70%);
  animation:ac-orb 17s ease-in-out infinite alternate;
}
.tf-account-orb-b{
  width:min(360px,45vw);height:min(360px,45vw);
  right:-8%;top:30%;
  background:radial-gradient(circle,rgba(76,175,120,.14),transparent 70%);
  animation:ac-orb 21s ease-in-out infinite alternate-reverse;
}

.tf-account-state{
  position:relative;
  z-index:1;
  padding:120px 24px 80px;
  text-align:center;
  color:var(--ac-muted);
}
.tf-account-state a{color:var(--ac-green);font-weight:700}

.tf-account-hero{
  position:relative;
  z-index:1;
  padding:clamp(28px,4vw,44px) 0 clamp(8px,1.5vw,16px);
}
.tf-account-hero-inner{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(260px,.75fr);
  gap:clamp(18px,3vw,28px);
  align-items:stretch;
}
.tf-account-eyebrow{
  margin:0 0 12px;
  color:var(--ac-green);
  font-size:11px;
  font-weight:750;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.tf-account-title-row{
  display:flex;
  align-items:center;
  gap:16px;
}
.tf-account-mark{
  display:grid;
  place-items:center;
  width:64px;height:64px;
  border-radius:18px;
  background:linear-gradient(145deg,#3BA56C,#2F9E63);
  color:#fff;
  font-family:"Space Grotesk",Inter,system-ui,sans-serif;
  font-size:1.55rem;
  font-weight:700;
  flex-shrink:0;
  box-shadow:0 10px 24px rgba(47,158,99,.22);
}
.tf-account-hero-copy h1{
  margin:0;
  font-family:"Space Grotesk",Inter,system-ui,sans-serif;
  font-size:clamp(1.9rem,3.6vw,2.7rem);
  letter-spacing:-.04em;
  line-height:1.05;
}
.tf-account-lead{
  margin:8px 0 0;
  color:var(--ac-muted);
  font-size:1rem;
  line-height:1.45;
}
.tf-account-chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}
.tf-account-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border:1px solid var(--ac-border);
  border-radius:12px;
  background:var(--ac-soft);
  color:var(--ac-muted);
  font-size:13px;
  font-weight:600;
}
.tf-account-chip strong{color:var(--ac-text);font-weight:800}
.tf-account-chip-balance strong{color:var(--ac-green)}

.tf-account-balance-card{
  border:1px solid var(--ac-border);
  border-radius:22px;
  background:
    linear-gradient(160deg,var(--ac-green-soft),transparent 42%),
    var(--ac-panel);
  box-shadow:var(--ac-shadow);
  padding:clamp(22px,3vw,28px);
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.tf-account-panel-label{
  margin:0;
  color:var(--ac-muted);
  font-size:12px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.tf-account-balance-value{
  margin:10px 0 0;
  font-family:"Space Grotesk",Inter,system-ui,sans-serif;
  font-size:clamp(1.7rem,3vw,2.15rem);
  font-weight:700;
  letter-spacing:-.03em;
  color:var(--ac-green)!important;
  line-height:1.1;
}
.tf-account-panel-note{
  margin:8px 0 0;
  color:var(--ac-muted);
  font-size:13px;
}
.tf-account-hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.tf-account-btn-primary{
  background:var(--ac-green)!important;
  border-color:transparent!important;
  color:#F7FBF8!important;
  border-radius:12px!important;
  font-weight:750!important;
  min-height:44px;
  box-shadow:0 8px 20px rgba(47,158,99,.22)!important;
  transition:transform .2s var(--ac-ease);
}
.tf-account-btn-primary:hover{transform:translateY(-1px)}
.tf-account-btn-ghost{
  background:var(--ac-soft)!important;
  border:1px solid var(--ac-border)!important;
  color:var(--ac-text)!important;
  border-radius:12px!important;
  font-weight:700!important;
  min-height:44px;
}
.tf-account-btn-ghost:hover{border-color:var(--ac-green-border)!important}

.tf-account-section{
  position:relative;
  z-index:1;
  padding:clamp(18px,3vw,28px) 0;
}
.tf-account-orders-section{padding-bottom:clamp(40px,6vw,72px)}

.tf-account-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(14px,2vw,18px);
  align-items:stretch;
}
.tf-account-card{
  border:1px solid var(--ac-border);
  border-radius:22px;
  background:var(--ac-panel);
  box-shadow:var(--ac-shadow);
  padding:clamp(20px,2.5vw,26px);
  display:flex;
  flex-direction:column;
}
.tf-account-card-head{
  display:flex;
  gap:14px;
  align-items:flex-start;
  margin-bottom:16px;
}
.tf-account-card-icon{
  display:grid;
  place-items:center;
  width:42px;height:42px;
  border-radius:12px;
  background:var(--ac-green-soft);
  color:var(--ac-green);
  font-size:18px;
  font-weight:800;
  flex-shrink:0;
}
.tf-account-card-head h2{
  margin:0;
  font-family:"Space Grotesk",Inter,system-ui,sans-serif;
  font-size:1.25rem;
  letter-spacing:-.02em;
}
.tf-account-card-head p{
  margin:4px 0 0;
  color:var(--ac-muted);
  font-size:13.5px;
}

.tf-account-details{
  display:grid;
  gap:0;
  margin:0;
}
.tf-account-details div{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  padding:12px 0;
  border-bottom:1px solid var(--ac-border);
}
.tf-account-details div:last-child{border-bottom:0;padding-bottom:0}
.tf-account-details dt{
  margin:0;
  color:var(--ac-muted);
  font-weight:700;
  font-size:13.5px;
}
.tf-account-details dd{
  margin:0;
  text-align:right;
  font-weight:700;
  font-size:14px;
  color:var(--ac-text);
  word-break:break-word;
}
.tf-account-dd-balance{color:var(--ac-green)!important}

.tf-account-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:auto;
  padding-top:18px;
}
.tf-account-actions .btn{flex:1 1 auto;min-width:0}

.tf-account-security-list{
  display:grid;
  gap:8px;
  margin-bottom:4px;
}
.tf-account-security-item{
  display:grid;
  gap:2px;
  padding:12px 14px;
  border:1px solid var(--ac-border);
  border-radius:14px;
  background:var(--ac-soft);
  color:var(--ac-text);
  text-decoration:none;
  transition:border-color .2s ease, transform .2s var(--ac-ease);
}
.tf-account-security-item:hover{
  border-color:var(--ac-green-border);
  transform:translateY(-1px);
}
.tf-account-security-item span{
  font-weight:750;
  font-size:14px;
  color:var(--ac-green);
}
.tf-account-security-item small{
  color:var(--ac-muted);
  font-size:12.5px;
}

.tf-account-orders-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.tf-account-orders-head h2{
  margin:0;
  font-family:"Space Grotesk",Inter,system-ui,sans-serif;
  font-size:clamp(1.4rem,2.4vw,1.85rem);
  letter-spacing:-.03em;
}
.tf-account-table-wrap{
  overflow:auto;
  border:1px solid var(--ac-border);
  border-radius:18px;
  background:var(--ac-panel);
  box-shadow:var(--ac-shadow);
}
.tf-account-table{
  width:100%;
  border-collapse:collapse;
  min-width:560px;
}
.tf-account-table th,
.tf-account-table td{
  padding:14px 16px;
  text-align:left;
  border-bottom:1px solid var(--ac-border);
  font-size:14px;
}
.tf-account-table th{
  color:var(--ac-muted);
  font-size:11px;
  font-weight:750;
  letter-spacing:.08em;
  text-transform:uppercase;
  background:var(--ac-soft);
}
.tf-account-table tr:last-child td{border-bottom:0}
.tf-account-table tbody tr:hover{background:var(--ac-soft)}
.tf-account-order-id{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12.5px;
  color:var(--ac-muted);
}
.tf-account-status{
  display:inline-flex;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:750;
  text-transform:capitalize;
  border:1px solid var(--ac-border);
  background:var(--ac-soft);
  color:var(--ac-muted);
}
.tf-account-status.is-ok{
  color:var(--ac-ok);
  border-color:rgba(47,158,99,.28);
  background:rgba(47,158,99,.1);
}
.tf-account-status.is-pending{
  color:var(--ac-pending);
  border-color:rgba(184,134,11,.28);
  background:rgba(184,134,11,.1);
}
.tf-account-status.is-bad{
  color:var(--ac-bad);
  border-color:rgba(196,75,75,.28);
  background:rgba(196,75,75,.1);
}
.tf-account-form-foot{
  margin-top:14px;
  text-align:right;
}
.tf-account-form-foot a{
  color:var(--ac-green);
  font-weight:750;
}

.tf-account-anim{
  opacity:0;
  transform:translateY(14px);
  animation:ac-rise .55s var(--ac-ease) forwards;
  animation-delay:var(--d,0ms);
}

@keyframes ac-rise{to{opacity:1;transform:none}}
@keyframes ac-orb{
  from{transform:translate3d(0,0,0) scale(1)}
  to{transform:translate3d(16px,10px,0) scale(1.06)}
}

@media (max-width:980px){
  .tf-account-hero-inner{grid-template-columns:1fr}
  .tf-account-grid{grid-template-columns:1fr}
}
@media (max-width:620px){
  .tf-account-page{padding-top:64px}
  .tf-account-title-row{align-items:flex-start}
  .tf-account-mark{width:54px;height:54px;font-size:1.3rem;border-radius:16px}
  .tf-account-hero-actions{flex-direction:column}
  .tf-account-hero-actions .btn{width:100%}
  .tf-account-table{min-width:0}
  .tf-account-table thead{display:none}
  .tf-account-table,
  .tf-account-table tbody,
  .tf-account-table tr,
  .tf-account-table td{display:block;width:100%}
  .tf-account-table tr{
    padding:14px 16px;
    border-bottom:1px solid var(--ac-border);
  }
  .tf-account-table tr:last-child{border-bottom:0}
  .tf-account-table td{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:8px 0;
    border-bottom:0;
    text-align:right;
  }
  .tf-account-table td::before{
    content:attr(data-label);
    color:var(--ac-muted);
    font-weight:700;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.06em;
    text-align:left;
  }
}

@media (prefers-reduced-motion:reduce){
  .tf-account-orb,
  .tf-account-anim{animation:none!important}
  .tf-account-anim{opacity:1;transform:none}
  .tf-account-btn-primary:hover,
  .tf-account-security-item:hover{transform:none!important}
}
