@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
  --bg:            #ffffff;
  --bg-alt:        #f6f7fb;
  --surface:       #ffffff;
  --text:          #12141c;
  --text-muted:    #5b616e;
  --border:        #e7e9f0;

  --accent:        #3654ff;
  --accent-soft:   #edf0ff;
  --gold:          #c99a4b;

  --font-display:  'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body:     'Inter', 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 28px;

  --max-w: 1140px;

  --shadow-sm: 0 1px 2px rgba(18,20,28,.06);
  --shadow-md: 0 12px 32px -12px rgba(18,20,28,.18);

  color-scheme: light;
}

[data-theme="dark"]{
  --bg:            #0a0c12;
  --bg-alt:        #10131b;
  --surface:       #131722;
  --text:          #eef0f6;
  --text-muted:    #8991a3;
  --border:        #232838;

  --accent:        #6b85ff;
  --accent-soft:   #171c2e;
  --gold:          #d7ac66;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 20px 48px -16px rgba(0,0,0,.6);

  color-scheme: dark;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; height:100%; }
body{
  margin:0;
  display:flex;
  flex-direction:column;
  min-height:100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3{ font-family: var(--font-display); margin:0; letter-spacing:-0.02em; }
button{ font-family:inherit; cursor:pointer; }
::selection{ background: var(--accent); color:#fff; }
:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; }

.container{ max-width: var(--max-w); margin:0 auto; padding:0 24px; }

/* ---------------- Header / nav ---------------- */
header.site-header{
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site-header .bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 24px;
}

/* Brand: logo mark + stacked name/subtitle */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.brand-logo{
  width:36px;
  height:36px;
  object-fit:contain;
}
.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.brand-name{
  font-family: var(--font-display);
  font-weight:700;
  font-size:1.05rem;
  letter-spacing:.02em;
  color: var(--text);
}
.brand-sub{
  font-family: var(--font-mono);
  font-size:.66rem;
  font-weight:500;
  color: var(--text-muted);
  text-transform:uppercase;
  letter-spacing:.1em;
}

nav.main-nav{ display:flex; gap:32px; align-items:center; flex:1; }
nav.main-nav a{
  font-size:.95rem;
  font-weight:500;
  color: var(--text-muted);
  position:relative;
  padding:4px 2px;
  transition: color .2s ease;
}
nav.main-nav a:hover, nav.main-nav a.active{ color: var(--text); }
nav.main-nav a.active::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-6px;
  height:2px;
  background: var(--accent);
  border-radius:2px;
}
.mobile-only-link{ display:none; }

/* Header actions: cart icon + primary CTA + mobile hamburger */
.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}
.icon-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border:1px solid var(--border);
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease, color .2s ease;
}
.icon-btn:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.icon-btn svg{ width:18px; height:18px; }

.hamburger-btn{
  display:none;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius: var(--radius-sm);
  background: transparent;
  border:1px solid var(--border);
  color: var(--text);
  flex-shrink:0;
}
.hamburger-btn svg{ width:20px; height:20px; }
.hamburger-btn:hover{ border-color: var(--accent); }

.header-user-chip{
  display:flex;
  align-items:center;
  gap:9px;
  padding:6px 14px 6px 6px;
  border-radius:999px;
  background: var(--surface);
  border:1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease;
}
.header-user-chip:hover{ border-color: var(--accent); transform: translateY(-2px); }
.header-user-avatar{
  width:26px; height:26px;
  border-radius:50%;
  background: var(--accent-soft);
  color: var(--accent);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display);
  font-weight:700;
  font-size:.72rem;
  flex-shrink:0;
}
.header-user-email{
  font-size:.82rem;
  font-weight:500;
  color: var(--text);
  max-width:180px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media (max-width:1080px){
  .header-user-email{ display:none; }
  .header-user-chip{ padding:6px; }
}
@media (max-width:860px){
  .header-user-chip{ display:none; }
}

.btn{
  font-family: var(--font-body);
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size:.88rem;
  font-weight:600;
  border:1px solid transparent;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover{ transform: translateY(-2px); }
.btn-sm{ padding: 10px 18px; font-size:.85rem; }
.btn-brass{ background: var(--accent); color:#fff; }
.btn-brass:hover{ background: var(--accent); filter: brightness(1.08); }
.btn-outline{ border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-outline:hover{ border-color: var(--accent); color: var(--accent); }

/* ---------------- Hero ---------------- */
.hero{
    padding:40px 0;
    border-bottom:1px solid var(--border);
}

.hero > .container{
    margin-top:0;
    padding-top:0;
}
.hero .eyebrow{
  font-family: var(--font-mono);
  font-size:.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing:.12em;
  margin:0 0 12px;
}
.hero h1{
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  max-width: 680px;
  margin: 0 0 20px;
}
.hero p.lead{ color: var(--text-muted); max-width:540px; font-size:1.05rem; margin-bottom:28px; }
.hero .cta-row{ display:flex; gap:14px; }

.stats-row{
  display:grid;
  grid-template-columns: repeat(4,1fr);
  gap:1px;
  background: var(--border);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  overflow:hidden;
  margin-top:56px;
}
.stat-box{ background: var(--surface); padding:20px 16px; text-align:center; }
.stat-box .num{ font-family: var(--font-display); font-size:1.6rem; color: var(--accent); font-weight:700; }
.stat-box .label{ font-size:.72rem; color: var(--text-muted); text-transform:uppercase; letter-spacing:.08em; margin-top:4px; }

/* ---------------- Sections ---------------- */
.section{ padding: 56px 0; }
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-bottom:28px;
  padding-bottom:16px;
  border-bottom:1px solid var(--border);
}
.section-head h2{
  font-size:1.3rem;
  display:flex;
  align-items:center;
  gap:10px;
}
.section-head h2::before{
  content:"";
  width:6px; height:6px;
  border-radius:50%;
  background: var(--gold);
  display:inline-block;
}
.section-head a{ color: var(--accent); font-size:.85rem; font-weight:600; }

/* ---------------- Product grid / cards ---------------- */
.product-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap:22px; }
.card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  overflow:hidden;
  position:relative;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.card .thumb{
  aspect-ratio:16/10;
  background: var(--bg-alt);
  display:flex; align-items:center; justify-content:center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.card .thumb img{ width:100%; height:100%; object-fit:cover; }
.card .stamp{
  position:absolute; top:12px; right:12px;
  font-family: var(--font-mono);
  font-size:.7rem;
  background: var(--gold);
  color:#1e1608;
  padding:4px 10px;
  border-radius:999px;
  font-weight:700;
  letter-spacing:.05em;
}
.card .body{ padding:18px; }
.card .category{
  font-family: var(--font-mono);
  font-size:.72rem;
  color: var(--gold);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:600;
}
.card h3{ font-size:1.05rem; margin:8px 0 6px; font-family: var(--font-display); }
.card p.desc{
  font-size:.88rem; color: var(--text-muted); margin:0 0 14px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.card .price-row{
  display:flex; align-items:baseline; justify-content:space-between;
  border-top:1px solid var(--border); padding-top:12px;
}
.price-now{ font-family: var(--font-display); font-size:1.15rem; color: var(--accent); font-weight:700; }
.price-was{ font-size:.82rem; color: var(--text-muted); text-decoration:line-through; margin-right:6px; }
.sold-count{ font-size:.72rem; color: var(--text-muted); font-family: var(--font-mono); }
.card .card-actions{ margin-top:14px; }
.card .card-actions .btn{ width:100%; justify-content:center; }

/* ---------------- Product detail ---------------- */
.product-detail{ display:grid; grid-template-columns:1.1fr .9fr; gap:48px; padding:48px 0; }
.product-detail .gallery img{
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom:12px;
  box-shadow: var(--shadow-sm);
}
.product-detail .spec-sheet{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:26px;
  height:fit-content;
  position:sticky;
  top:96px;
  box-shadow: var(--shadow-sm);
}
.spec-sheet h1{ font-size:1.5rem; margin:0 0 6px; }
.spec-sheet .version-tag{ font-family: var(--font-mono); font-size:.78rem; color: var(--text-muted); }
.spec-row{ display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--border); font-size:.9rem; }
.spec-row span:first-child{ color: var(--text-muted); }
.buy-price{ font-family: var(--font-display); font-size:2rem; color: var(--accent); margin:18px 0 4px; font-weight:700; }
#paypal-button-container{ margin-top:16px; }

/* ---------------- Cart page ---------------- */
.cart-layout{ display:grid; grid-template-columns:1.6fr .9fr; gap:40px; padding:32px 0 56px; }
.cart-item{ display:flex; align-items:center; gap:16px; padding:18px 0; border-bottom:1px solid var(--border); }
.cart-item .thumb{ width:96px; height:72px; border-radius:var(--radius-sm); overflow:hidden; background:var(--bg-alt); flex-shrink:0; }
.cart-item .thumb img{ width:100%; height:100%; object-fit:cover; }
.cart-item .info{ flex:1; min-width:0; }
.cart-item .info h3{ font-size:1rem; margin:2px 0 8px; font-family:var(--font-display); }
.cart-item .info .cat{ font-family:var(--font-mono); font-size:.7rem; color:var(--gold); text-transform:uppercase; letter-spacing:.06em; }
.cart-item .remove-btn{ background:none; border:none; color:var(--text-muted); font-size:.8rem; cursor:pointer; padding:0; }
.cart-item .remove-btn:hover{ color:#c14f3f; }
.cart-item .price{ font-family:var(--font-display); font-weight:700; color:var(--accent); flex-shrink:0; }

.cart-summary{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:26px;
  height:fit-content;
  position:sticky;
  top:96px;
  box-shadow: var(--shadow-sm);
}
.cart-summary h2{ font-size:1.1rem; margin-bottom:18px; }
.cart-summary .row{ display:flex; justify-content:space-between; font-size:.9rem; padding:8px 0; border-bottom:1px solid var(--border); }
.cart-summary .total-row{ font-family: var(--font-display); font-weight:700; font-size:1.15rem; color: var(--accent); border-bottom:none; }

@media (max-width:800px){
  .cart-layout{ grid-template-columns:1fr; }
  .cart-summary{ position:static; }
}

/* ---------------- Forms ---------------- */
.form-card{
  max-width:420px; margin:60px auto;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:32px;
  box-shadow: var(--shadow-sm);
}
.form-card h1{ font-size:1.3rem; margin-top:0; }
.field{ margin-bottom:18px; }
.field label{ display:block; font-size:.85rem; color: var(--text-muted); margin-bottom:6px; }
.field input, .field select, .field textarea{
  width:100%; padding:11px 14px;
  background: var(--bg-alt);
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size:.92rem;
}
.field input:focus, .field textarea:focus{ outline:none; border-color: var(--accent); }
.alert{ padding:11px 16px; border-radius: var(--radius-sm); font-size:.85rem; margin-bottom:16px; }
.alert-error{ background: color-mix(in srgb, #e2705f 12%, transparent); border:1px solid #e2705f; color:#c14f3f; }
.alert-success{ background: var(--accent-soft); border:1px solid var(--accent); color: var(--accent); }

/* ---------------- Tables (dashboard/admin) ---------------- */
table.data-table{ width:100%; border-collapse:collapse; font-size:.9rem; }
table.data-table th, table.data-table td{ text-align:left; padding:13px 12px; border-bottom:1px solid var(--border); }
table.data-table th{ font-family: var(--font-mono); font-size:.72rem; color: var(--text-muted); text-transform:uppercase; letter-spacing:.06em; }

/* ---------------- Catalog toolbar (search + filters) ---------------- */
.catalog-toolbar{
  display:flex;
  gap:12px;
  margin-bottom:18px;
  flex-wrap:wrap;
}
.search-box{
  flex:1;
  min-width:220px;
  position:relative;
}
.search-box input{
  width:100%;
  padding:12px 16px 12px 40px;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size:.92rem;
}
.search-box input:focus{ outline:none; border-color: var(--accent); }
.search-box::before{
  content:"";
  position:absolute;
  left:14px; top:50%;
  width:16px; height:16px;
  transform: translateY(-50%);
  background: var(--text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/contain no-repeat;
}
.catalog-toolbar select{
  padding:12px 14px;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size:.88rem;
}
.results-count{
  font-size:.85rem;
  color: var(--text-muted);
  margin-bottom:20px;
  font-family: var(--font-mono);
}
.empty-state{
  text-align:center;
  padding:60px 20px;
  color: var(--text-muted);
  font-size:.95rem;
}
.skeleton-card{
  background: var(--bg-alt);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  aspect-ratio: 16/13;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.55; } }

/* ---------------- Footer ---------------- */
footer.site-footer{
  border-top:1px solid var(--border);
  padding:56px 0 100px;
  margin-top:auto;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap:32px;
}
.footer-brand .footer-desc{
  color: var(--text-muted);
  font-size:.88rem;
  max-width:280px;
  margin-top:12px;
}
.footer-col h4{
  font-family: var(--font-mono);
  font-size:.72rem;
  color: var(--text-muted);
  text-transform:uppercase;
  letter-spacing:.08em;
  margin:0 0 16px;
}
.footer-col a{
  display:block;
  font-size:.9rem;
  color: var(--text-muted);
  padding:6px 0;
  transition: color .2s ease;
}
.footer-col a:hover{ color: var(--accent); }
.footer-bottom{
  border-top:1px solid var(--border);
  margin-top:40px;
  padding-top:20px;
  font-size:.82rem;
  color: var(--text-muted);
  text-align:center;
}

@media (max-width:800px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .footer-brand{ grid-column: 1 / -1; margin-bottom:12px; }
}

/* ---------------- Theme toggle ---------------- */
.theme-toggle{
  position:fixed;
  right:24px; bottom:24px;
  z-index:200;
  display:flex; align-items:center; gap:8px;
  padding:12px 18px;
  background: var(--text);
  color: var(--bg);
  border:none;
  border-radius:999px;
  font-size:.85rem;
  font-weight:600;
  box-shadow: var(--shadow-md);
  transition: transform .2s ease;
}
.theme-toggle:hover{ transform: translateY(-2px); }

/* ---------------- Responsive header ---------------- */
@media (max-width:860px){

  header.site-header .bar{
      display:flex;
      align-items:center;
      justify-content:space-between;
      height:72px;
      padding:0;
      position:relative;
      gap:12px;
      flex-wrap:nowrap;
  }

  .brand-logo{width:32px;height:32px;}
  .header-actions{gap:8px;}
  .icon-btn,.hamburger-btn{width:40px;height:40px;}
  .hamburger-btn{display:flex;}
  #hamburgerBtn{order:2;}
  #cartBtn{order:1;}
  .btn-sm{padding:10px 16px;font-size:.82rem;}
  .desktop-logout{display:none;}
  .mobile-only-link{display:block;}

  nav.main-nav{
      position:absolute;
      top:100%;
      left:0;
      right:0;
      display:flex;
      flex-direction:column;
      align-items:stretch;
      gap:0;
      background:var(--bg);
      border-bottom:1px solid var(--border);
      max-height:0;
      overflow:hidden;
      transition:max-height .25s ease;
      z-index:999;
  }

  nav.main-nav.open{max-height:480px;}

  nav.main-nav a{
      padding:16px 24px;
      border-bottom:1px solid var(--border);
  }

  nav.main-nav a.active{color:var(--accent);}
  nav.main-nav a.active::after{display:none;}
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

#site-header{
  position:sticky;
  top:0;
  z-index:1000;
}

.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:color-mix(in srgb,var(--bg) 88%,transparent);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

/* ---------------- Auth pages (login/register) ---------------- */
.auth-layout{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:48px;
  align-items:center;
  min-height: calc(100vh - 320px);
  padding: 60px 24px;
  max-width: var(--max-w);
  margin:0 auto;
}
.auth-info{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:40px;
  box-shadow: var(--shadow-sm);
}
.auth-info h2{ font-size:1.6rem; margin-bottom:10px; }
.auth-info p.lead{ color: var(--text-muted); font-size:.95rem; margin-bottom:28px; }
.feature-item{
  background: var(--bg-alt);
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:14px 16px;
  font-size:.88rem;
  color: var(--text-muted);
  margin-bottom:12px;
}

.auth-form-card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:36px;
  box-shadow: var(--shadow-md);
}
.auth-form-card h1{ font-size:1.4rem; margin-bottom:4px; }
.auth-form-card p.sub{ color: var(--text-muted); font-size:.88rem; margin-bottom:22px; }

.password-field{ position:relative; }
.password-field input{ padding-right:56px; }
.password-toggle{
  position:absolute;
  right:12px; top:38px;
  background:none; border:none;
  font-size:.78rem; font-weight:600;
  color: var(--accent);
  cursor:pointer;
}

.remember-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:20px;
  font-size:.85rem;
  color: var(--text-muted);
}
.remember-row input{ width:auto; accent-color: var(--accent); }

@media (max-width:800px){
  .auth-layout{ grid-template-columns:1fr; padding:32px 24px; }
  .auth-info{ order:2; }
}

/* ===== Mobile header redesign ===== */
@media (max-width:860px){
header.site-header .bar{height:68px;padding:0 20px;display:flex;align-items:center;justify-content:space-between}
.brand{flex:1;justify-content:flex-start}
.brand-logo{width:42px!important;height:42px!important;margin-left:0}
.brand-text{display:none!important}
.header-actions{display:flex;align-items:center;gap:10px;margin-left:auto}
#hamburgerBtn{order:1}
#cartBtn{order:2}
.header-actions>.btn{order:3}
nav.main-nav{top:68px}
}

.sold-badge{
  position:absolute; top:12px; right:12px; z-index:2;
  display:flex; align-items:center; gap:5px;
  background: rgba(10,12,18,.62);
  color:#fff;
  font-family: var(--font-mono);
  font-size:.68rem;
  font-weight:700;
  padding:5px 10px 5px 8px;
  border-radius:999px;
  letter-spacing:.03em;
  backdrop-filter: blur(4px);
}
.sold-badge svg{ width:11px; height:11px; color: var(--gold); }

.badge-pill{
  display:inline-block;
  font-family: var(--font-mono);
  font-size:.62rem;
  font-weight:700;
  padding:3px 9px;
  border-radius:999px;
  background: var(--accent-soft);
  color: var(--accent);
  text-transform:uppercase;
  letter-spacing:.05em;
  vertical-align:middle;
}

.version-chip{
  font-family: var(--font-mono);
  font-size:.72rem;
  color: var(--text-muted);
}

/* ---- Product detail: breadcrumb ---- */
.breadcrumb{
  font-size:.85rem;
  color: var(--text-muted);
  margin-bottom:24px;
}
.breadcrumb a{ color: var(--text-muted); }
.breadcrumb a:hover{ color: var(--accent); }
.breadcrumb span:last-child{ color: var(--text); }

/* ---- Product detail: main layout ---- */
.pd-layout{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:48px;
}
.gallery-main{
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  overflow:hidden;
  box-shadow: var(--shadow-sm);
  background: var(--bg-alt);
  display:flex;
  align-items:center;
  justify-content:center;
  max-height:520px;
}
.gallery-main img{ width:100%; height:auto; max-height:520px; object-fit:contain; }
.thumb-strip{
  display:flex;
  gap:10px;
  margin-top:12px;
  overflow-x:auto;
}
.thumb-strip-item{
  width:76px; height:56px;
  object-fit:cover;
  border-radius: var(--radius-sm);
  border:1px solid var(--border);
  cursor:pointer;
  flex-shrink:0;
  opacity:.7;
  transition: opacity .2s ease, border-color .2s ease;
}
.thumb-strip-item:hover{ opacity:1; }
.thumb-strip-item.active{ opacity:1; border-color: var(--accent); }

.badge-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0;
}
.rating-pill, .sold-pill{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-family: var(--font-mono);
  font-size:.72rem;
  font-weight:600;
  color: var(--text-muted);
  background: var(--bg-alt);
  border:1px solid var(--border);
  padding:4px 10px;
  border-radius:999px;
}
.rating-pill svg{ width:12px; height:12px; color: var(--gold); }
.sold-pill svg{ width:12px; height:12px; color: var(--gold); }

/* ---- Feature checklist ---- */
.feature-checklist{
  list-style:none;
  margin:18px 0 0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.feature-checklist li{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:.88rem;
  color: var(--text);
}
.feature-checklist li svg{
  width:16px; height:16px;
  flex-shrink:0;
  color: var(--accent);
}
.feature-checklist li.feature-extra{ display:none; }
.show-more-btn{
  background:none;
  border:none;
  color: var(--accent);
  font-size:.85rem;
  font-weight:600;
  padding:10px 0 0;
  cursor:pointer;
}
.show-more-btn:hover{ text-decoration:underline; }

.buy-actions{
  display:flex;
  gap:10px;
  margin-top:20px;
}
.buy-actions .btn{ flex:1; justify-content:center; }

/* ---- Tabs + product info sidebar ---- */
.pd-tabs-layout{
  display:grid;
  grid-template-columns: 1.4fr .9fr;
  gap:40px;
  margin-top:56px;
  align-items:start;
}
.tab-bar{
  display:flex;
  gap:4px;
  border-bottom:1px solid var(--border);
  margin-bottom:24px;
}
.tab-btn{
  background:none;
  border:none;
  padding:10px 16px;
  font-size:.88rem;
  font-weight:600;
  color: var(--text-muted);
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
  transition: color .2s ease, border-color .2s ease;
}
.tab-btn:hover{ color: var(--text); }
.tab-btn.active{ color: var(--accent); border-color: var(--accent); }

.tab-pane{ display:none; }
.tab-pane.active{ display:block; }
.tab-pane h2{ font-size:1.15rem; margin-bottom:14px; }

.tab-image-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap:12px;
}
.tab-image-grid img{
  width:100%;
  aspect-ratio:16/10;
  object-fit:cover;
  border-radius: var(--radius-sm);
  border:1px solid var(--border);
}

.product-info-card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:22px;
  box-shadow: var(--shadow-sm);
}
.pic-title{
  font-family: var(--font-mono);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color: var(--text-muted);
  margin-bottom:6px;
}

.reviews-section{ margin-top:56px; }
.reviews-section h2{ font-size:1.15rem; margin-bottom:14px; }

@media (max-width:900px){
  .pd-layout{ grid-template-columns:1fr; }
  .pd-tabs-layout{ grid-template-columns:1fr; }
}

/* ---- Product detail: updates tab ---- */
.update-list{ display:flex; flex-direction:column; gap:16px; }
.update-entry{
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:14px 16px;
  background: var(--surface);
}
.update-entry-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:6px;
}
.update-date{
  font-family: var(--font-mono);
  font-size:.72rem;
  color: var(--text-muted);
}
.update-entry p{ margin:0; font-size:.88rem; color: var(--text-muted); }


#productRoot.container{ max-width: 1320px; }

/* Reference ratio is closer to 3:1 (gallery:spec-sheet), not 1.6:1 */
.pd-layout{
  grid-template-columns: 2.4fr .9fr;
}

.gallery-main{
  max-height: 560px;
}
.gallery-main img{
  max-height: 560px;
}

/* Tighter spec-sheet to match the reference's compact card */
.spec-sheet{
  padding: 22px;
}
.spec-sheet h1{
  font-size: 1.3rem;
}
.buy-price{
  font-size: 1.7rem;
}

.pd-tabs-layout{
  grid-template-columns: 2.2fr .8fr;
  margin-top: 40px;
}

.fc-product{
  --fc-card: var(--surface);
  --fc-card2: var(--bg-alt);
  --fc-border: var(--border);
  --fc-border-strong: var(--border);
  --fc-muted: var(--text-muted);
  --fc-faint: var(--text-muted);
  --fc-star: var(--gold);
  --fc-green: #1f8a5a;
  --fc-blue: var(--accent);
  --fc-accent: var(--gold);
  --fc-accent-2: var(--gold);
  --fc-accent-text: #1e1608;
}
[data-theme="dark"] .fc-product{
  --fc-card: #0c0c0c;
  --fc-card2: #101010;
  --fc-border: rgba(255,255,255,.07);
  --fc-border-strong: rgba(255,255,255,.13);
  --fc-muted: #888;
  --fc-faint: #515151;
  --fc-star: #f5a227;
  --fc-green: #6ee89a;
  --fc-blue: #7eb3ff;
  --fc-accent: #f5a227;
  --fc-accent-2: #e8832a;
  --fc-accent-text: #0a0a0a;
}

.fc-grid{
  display:grid;
  grid-template-columns: 1fr 280px;
  gap:32px;
  align-items:start;
}
.fc-main{ min-width:0; }

.fc-gallery-main{
  border:1px solid var(--fc-border);
  border-radius:12px;
  overflow:hidden;
  background: var(--fc-card2);
  margin:0 auto 12px;
  max-width:760px;
  aspect-ratio:16/10;
  display:flex;
  align-items:center;
  justify-content:center;
}
.fc-gallery-main img{ width:100%; height:100%; object-fit:cover; }

.fc-thumb-strip{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:24px;
}
.fc-thumb-strip-item{
  width:64px; height:64px;
  border-radius:6px;
  overflow:hidden;
  border:1px solid var(--fc-border-strong);
  opacity:.65;
  cursor:pointer;
  padding:0;
  background: var(--fc-card2);
  transition: opacity .15s ease, border-color .15s ease;
}
.fc-thumb-strip-item img{ width:100%; height:100%; object-fit:cover; }
.fc-thumb-strip-item.active{ opacity:1; border-color: var(--fc-border-strong); }

.fc-tab-bar{
  display:flex;
  flex-wrap:wrap;
  gap:0;
  border-bottom:1px solid var(--fc-border);
  margin-bottom:24px;
}
.fc-tab-btn{
  background:none;
  border:none;
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
  padding:10px 16px;
  font-size:13px;
  font-weight:500;
  color: var(--fc-muted);
  transition: color .15s ease, border-color .15s ease;
}
.fc-tab-btn.active{ color: var(--text); border-color: var(--text); }
.fc-tab-btn:hover{ color: var(--text); }
.fc-tab-pane{ display:none; }
.fc-tab-pane.active{ display:block; }
.fc-tab-pane h3{ font-size:14px; font-weight:600; margin-bottom:8px; }
.fc-tab-pane p{ font-size:13px; line-height:1.7; color: var(--fc-muted); }

.fc-overview-grid{
  display:grid;
  grid-template-columns: 1fr 180px;
  gap:24px;
  align-items:start;
}

.fc-info-card{
  border:1px solid var(--fc-border);
  border-radius:10px;
  padding:16px;
  background: var(--fc-card2);
}
.fc-info-card h5{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.6px;
  color: var(--fc-faint);
  margin-bottom:12px;
}
.fc-info-row{
  display:flex;
  justify-content:space-between;
  gap:8px;
  font-size:11px;
  padding:6px 0;
}
.fc-info-row span:first-child{ color: var(--fc-faint); }
.fc-info-row span:last-child{ font-weight:500; text-align:right; }

.fc-tab-image-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap:12px;
}
.fc-tab-image-grid img{
  width:100%; aspect-ratio:16/10; object-fit:cover;
  border-radius:8px; border:1px solid var(--fc-border);
}

.fc-buybox{ position:sticky; top:96px; }
.fc-buybox-card{
  border:1px solid var(--fc-border-strong);
  border-radius:14px;
  padding:20px;
  background: var(--fc-card);
}
.fc-buybox-head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.fc-buybox-title{ font-size:17px; font-weight:700; letter-spacing:-.3px; color: var(--text); }
.fc-buybox-price{ font-size:19px; font-weight:700; letter-spacing:-.5px; white-space:nowrap; color: var(--text); }
.fc-buybox-price-was{ font-size:11px; color: var(--fc-faint); text-decoration:line-through; }

.fc-badge-row{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.fc-badge{
  display:inline-flex;
  align-items:center;
  background: var(--fc-border);
  color: var(--fc-muted);
  text-transform:uppercase;
  letter-spacing:.2px;
  border:1px solid var(--fc-border);
  border-radius:999px;
  padding:3px 8px;
  font-size:9.5px;
  font-weight:600;
  line-height:1;
}
.fc-badge-green{ color: var(--fc-green); background: color-mix(in srgb, var(--fc-green) 12%, transparent); border-color: color-mix(in srgb, var(--fc-green) 33%, transparent); }
.fc-badge-blue{ color: var(--fc-blue); background: color-mix(in srgb, var(--fc-blue) 12%, transparent); border-color: color-mix(in srgb, var(--fc-blue) 33%, transparent); }

.fc-buybox-category{ font-size:11px; color: var(--fc-faint); margin-bottom:12px; }

.fc-buybox-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:12px; }
.fc-rating-pill{ display:flex; align-items:center; gap:6px; font-size:11px; color: var(--fc-star); }
.fc-rating-pill svg{ width:12px; height:12px; }
.fc-rating-pill span{ color: var(--fc-muted); }
.fc-sold-pill{
  display:inline-flex; align-items:center; gap:6px;
  border-radius:999px;
  padding:4px 10px;
  font-size:10.5px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.04em;
  color: var(--text);
  background: var(--fc-border);
  border:1px solid var(--fc-border-strong);
}
.fc-sold-pill svg{ width:12px; height:12px; color: var(--fc-star); }
.fc-buybox-desc{ font-size:12px; line-height:1.6; color: var(--fc-muted); margin-bottom:16px; }

.fc-feature-list{ list-style:none; margin:0 0 20px; padding:0; display:flex; flex-direction:column; gap:8px; }
.fc-feature-list li{ display:flex; align-items:center; gap:8px; font-size:12px; color: var(--fc-muted); }
.fc-feature-list li .fc-check{ flex-shrink:0; font-size:11px; font-weight:700; color: var(--fc-green); }
.fc-feature-list li.fc-feature-extra{ display:none; }

.fc-show-more{
  display:block;
  background:none; border:none; padding:0 0 20px;
  color: var(--text); font-size:12px; font-weight:600; cursor:pointer;
}
.fc-show-more:hover{ text-decoration:underline; }

.fc-buybox-divider{ border:none; border-top:1px solid var(--fc-border); margin-bottom:16px; }

.fc-buy-actions{ display:flex; gap:8px; }
.fc-buy-actions > *{ flex:1; }
.fc-btn-buy{
  display:inline-flex; align-items:center; justify-content:center;
  min-height:36px;
  border-radius:10px;
  font-size:12px;
  font-weight:600;
  letter-spacing:.01em;
 background: var(--accent); color:#fff;
 background: var(--accent); filter: brightness(1.08); 
  border:none;
  transition: opacity .15s ease;
}
.fc-btn-buy:hover{ opacity:.92; transform:none; }
.fc-btn-demo{
  display:inline-flex; align-items:center; justify-content:center;
  min-height:36px;
  border-radius:10px;
  font-size:12px;
  font-weight:600;
  letter-spacing:.01em;
  border:1px solid var(--fc-border-strong);
  color: var(--text);
  background:none;
  transition: background .15s ease, border-color .15s ease;
}
.fc-btn-demo:hover{ background: var(--fc-border); transform:none; }

.fc-related-head{ border-bottom-color: var(--border); }

@media (max-width:900px){
  .fc-grid{ grid-template-columns:1fr; }
  .fc-overview-grid{ grid-template-columns:1fr; }
  .fc-buybox{ position:static; }
}

.purchase-modal-backdrop {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,.6);
  align-items:center; justify-content:center; z-index:100; padding:20px;
}
.purchase-modal-backdrop.open { display:flex; }
.purchase-modal-box {
  background:#0c0c0c; border:1px solid rgba(255,255,255,.08); border-radius:14px;
  max-width:820px; width:100%; max-height:calc(100vh - 40px); overflow-y:auto;
  padding:24px;
}
.purchase-modal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.purchase-modal-grid { display:grid; grid-template-columns:1fr; gap:16px; }
@media (min-width:700px){ .purchase-modal-grid { grid-template-columns:1fr 1fr; } }
.purchase-panel { border:1px solid rgba(255,255,255,.08); border-radius:12px; padding:18px; }
.purchase-product-row { display:flex; gap:12px; align-items:center; margin-bottom:14px; }
.purchase-product-row img { width:52px; height:52px; border-radius:8px; object-fit:cover; }
.purchase-code-row { display:flex; gap:8px; margin-bottom:14px; }
.purchase-code-row input { flex:1; }
.purchase-total-row { display:flex; justify-content:space-between; align-items:center; margin:14px 0; font-weight:600; }
.purchase-support-bar {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-top:16px; padding:14px 16px; border-radius:12px;
  background:rgba(88,101,242,.08); border:1px solid rgba(88,101,242,.25);
}

.pay-select { position:relative; }
.pay-select-toggle {
  width:100%; display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; background:var(--bg-alt); border:1px solid var(--border);
  border-radius:var(--radius-md); color:var(--text); font-size:.9rem; cursor:pointer;
  font-family:inherit;
}
.pay-select-menu {
  position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:20;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm); overflow:hidden;
}
.pay-option { display:flex; align-items:center; gap:10px; padding:12px 14px; cursor:pointer; border-bottom:1px solid var(--border); font-size:.87rem; }
.pay-option:last-child { border-bottom:none; }
.pay-option:hover { background:var(--bg-alt); }
.pay-option-icon { width:26px; height:26px; border-radius:6px; background:var(--bg-alt); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:.7rem; font-family:var(--font-mono); color:var(--accent); flex-shrink:0; }
.pay-option-sub { display:block; font-size:.72rem; color:var(--text-muted); }
.paypal-slot { margin-top:12px; }

/* ---------------- QR Ph Payment Modal ---------------- */
.qrph-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
}

.qrph-modal-backdrop.open {
  display: flex;
}

.qrph-modal-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.qrph-modal-box h3 {
  color: var(--text);
  margin-bottom: 20px;
}

.qrph-modal-box img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto 20px;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
}

.qrph-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qrph-modal-close:hover {
  color: var(--text);
  border-color: var(--accent);
}

.qrph-status {
  color: var(--text-muted);
  font-size: .85rem;
}

/* =========================================================
   DASHBOARD SHELL
   ========================================================= */

/*
   IMPORTANT:
   The dashboard intentionally does NOT use --max-w or a
   1320px max-width.

   This allows the dashboard to fill the available viewport.
*/

.dash-wrap{
  width:100%;
  max-width:none;
  margin:0;
  padding:28px 48px 80px;
  display:grid;
  grid-template-columns:230px minmax(0,1fr);
  gap:40px;
  align-items:start;
}

/* ---- Sidebar ---- */

.dash-sidebar{
  width:230px;
  padding:16px;
  position:sticky;
  top:90px;
  align-self:start;
  max-height:calc(100vh - 110px);
  overflow-y:auto;
}

.dash-user{
  display:flex;
  align-items:center;
  gap:10px;
  padding:2px 2px 16px;
  margin-bottom:12px;
  border-bottom:1px solid var(--border);
}

.dash-user-avatar{
  width:36px;
  height:36px;
  border-radius:50%;
  background:var(--accent-soft);
  color:var(--accent);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--font-display);
  font-weight:700;
  font-size:.92rem;
  flex-shrink:0;
}

.dash-user-name{
  font-weight:600;
  font-size:.88rem;
}

.dash-user-role{
  font-size:.72rem;
  color:var(--text-muted);
}

.dash-nav{
  display:flex;
  flex-direction:column;
  gap:1px;
}

.dash-nav-item{
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 10px;
  border-radius:var(--radius-sm);
  font-size:.84rem;
  font-weight:500;
  color:var(--text-muted);
  background:transparent;
  border:none;
  width:100%;
  text-align:left;
  font-family:inherit;
  cursor:pointer;
  transition:background .15s ease, color .15s ease;
}

.dash-nav-item svg{
  width:15px;
  height:15px;
  flex-shrink:0;
}

.dash-nav-item:hover{
  background:var(--bg-alt);
  color:var(--text);
}

.dash-nav-item.active{
  background:var(--accent-soft);
  color:var(--accent);
  font-weight:600;
}

.dash-nav-divider{
  height:1px;
  background:var(--border);
  margin:12px 4px;
}

.dash-nav-item.dash-logout{
  color:#c14f3f;
}

.dash-nav-item.dash-logout:hover{
  background:color-mix(in srgb, #c14f3f 10%, transparent);
}

/* =========================================================
   MAIN DASHBOARD CONTENT
   ========================================================= */

.dash-main{
  width:100%;
  min-width:0;
  max-width:none;
}

.dash-panel{
  display:none;
  width:100%;
}

.dash-panel.active{
  display:block;
  width:100%;
}

.dash-panel-head{
  width:100%;
  margin-bottom:26px;
  padding-bottom:18px;
  border-bottom:1px solid var(--border);
}

.dash-panel-head h1{
  font-size:1.6rem;
  margin-bottom:6px;
}

.dash-panel-head p{
  color:var(--text-muted);
  font-size:.9rem;
  margin:0;
}

/* =========================================================
   STATISTICS
   ========================================================= */

.dash-stats{
  width:100%;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  background:transparent;
  border:none;
  border-radius:0;
  box-shadow:none;
  margin-bottom:28px;
  overflow:visible;
}

.dash-stat-card{
  width:100%;
  min-width:0;
  display:flex;
  align-items:center;
  gap:14px;
  padding:20px 22px;
  min-height:84px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm);
}

.dash-stat-card:last-child{
  border-right:1px solid var(--border);
}

.dash-stat-icon{
  width:40px;
  height:40px;
  border-radius:var(--radius-sm);
  background:var(--bg-alt);
  border:1px solid var(--border);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.dash-stat-icon svg{
  width:18px;
  height:18px;
}

.dash-stat-content{
  min-width:0;
}

.dash-stat-num{
  font-family:var(--font-display);
  font-size:1.5rem;
  font-weight:700;
  line-height:1.1;
  white-space:nowrap;
}

.dash-stat-label{
  font-size:.75rem;
  color:var(--text-muted);
  white-space:nowrap;
}

/* =========================================================
   FULL-WIDTH DASHBOARD CARDS
   ========================================================= */

.dash-card{
  width:100%;
  max-width:none;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm);
  margin-bottom:20px;
  overflow:hidden;
}

.dash-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:15px 18px;
  border-bottom:1px solid var(--border);
}

.dash-card-head h2{
  font-size:.96rem;
}

.dash-card-head a{
  color:var(--accent);
  font-size:.8rem;
  font-weight:600;
}

.dash-card-body{
  width:100%;
  padding:16px 18px;
}

.dash-card-body.no-pad{
  padding:0;
}

.dash-card-body table.data-table{
  margin:-4px 0;
}

.dash-card-body .empty-note{
  color:var(--text-muted);
  font-size:.86rem;
  margin:0;
}

.dash-empty-block{
  text-align:center;
  padding:36px 18px;
  color:var(--text-muted);
  font-size:.88rem;
}

.dash-empty-block strong{
  display:block;
  color:var(--text);
  font-size:.98rem;
  margin-bottom:6px;
}

.dash-support-callout{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  background:var(--accent-soft);
  border:1px solid var(--accent);
  border-radius:var(--radius-md);
  padding:16px 18px;
}

.dash-support-callout p{
  margin:4px 0 0;
  color:var(--text-muted);
  font-size:.84rem;
  max-width:440px;
}

/* ---- Account settings ---- */

.dash-field{
  margin-bottom:16px;
  max-width:100%;
}

.dash-field label{
  display:block;
  font-size:.7rem;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-bottom:5px;
}

.dash-field input[type="text"],
.dash-field input[type="password"],
.dash-field input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .92rem;
}

.dash-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.dash-field input[readonly]{
  opacity:.75;
  cursor:not-allowed;
}

.dash-link-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 13px;
  background:var(--bg-alt);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  font-size:.86rem;
  color:var(--text-muted);
  margin-bottom:13px;
  max-width:100%;
}

.dash-link-row a{
  color:var(--accent);
  font-weight:600;
}

.dash-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px;
  background:var(--bg-alt);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  max-width:100%;
  margin-bottom:13px;
}

.dash-toggle-row strong{
  font-size:.86rem;
  display:block;
}

.dash-toggle-row span.hint{
  font-size:.76rem;
  color:var(--text-muted);
}

.dash-toggle-row input[type="checkbox"]{
  width:18px;
  height:18px;
  accent-color:var(--accent);
  flex-shrink:0;
}

/* ---- Free System ---- */

.dash-referral-box{
  background:linear-gradient(135deg,var(--accent-soft),var(--bg-alt));
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.dash-referral-box .code-slot{
  font-family:var(--font-mono);
  font-size:.88rem;
  color:var(--text-muted);
}

.dash-steps{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:16px;
}

.dash-step{
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:13px;
  background:var(--bg-alt);
}

.dash-step .step-label{
  font-size:.66rem;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:4px;
}

.dash-step .step-title{
  font-size:.86rem;
  font-weight:600;
}

/* =========================================================
   RESPONSIVE DASHBOARD
   ========================================================= */

@media (max-width:1400px){

  .dash-wrap{
    padding-left:32px;
    padding-right:32px;
    gap:32px;
  }

}

@media (max-width:1100px){

  .dash-wrap{
    grid-template-columns:210px minmax(0,1fr);
    gap:28px;
    padding-left:24px;
    padding-right:24px;
  }

  .dash-sidebar{
    width:210px;
  }

  .dash-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

}

@media (max-width:780px){

  .dash-wrap{
    width:100%;
    grid-template-columns:1fr;
    padding:24px 20px 80px;
  }

  .dash-sidebar{
    width:100%;
    position:static;
    max-height:none;
    overflow:visible;
  }

  .dash-nav{
    flex-direction:row;
    flex-wrap:wrap;
  }

  .dash-nav-item{
    width:auto;
  }

  .dash-nav-divider{
    display:none;
  }

  .dash-logout{
    display:none;
  }

  .dash-stats{
    grid-template-columns:1fr;
    gap:12px;
  }

  .dash-stat-card{
    width:100%;
    border-right:1px solid var(--border);
  }

  .dash-steps{
    grid-template-columns:1fr;
  }

  .dash-card{
    width:100%;
  }

}

@media (max-width:600px){

  .dash-wrap{
    padding-left:16px;
    padding-right:16px;
  }

  .dash-panel-head h1{
    font-size:1.4rem;
  }

  .dash-card-head{
    padding:14px 16px;
  }

  .dash-card-body{
    padding:14px 16px;
  }

  .dash-stat-card{
    padding:18px;
  }

}