/* Line 1: Font import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap");

/* Line 2: Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Line 3: AUTH pages – full-bleed reference background, scrollable on small screens */
body.auth {
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,211,106,.22), transparent 24%),
    radial-gradient(circle at bottom right, rgba(99,255,193,.14), transparent 26%),
    linear-gradient(140deg, rgba(20,60,45,.62) 0%, rgba(8,22,18,.92) 100%),
    url("images/theme-auth-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-y: auto;
  position: relative;
}

/* Line 5: DASHBOARD only – animated crypto background */
body.dashboard {
  font-family: 'Poppins', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,211,106,.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(97,255,194,.14), transparent 26%),
    linear-gradient(135deg, #143c2d 0%, #1f5c40 45%, #2e7a57 100%);
  color: #eaf5ee;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body.dashboard::before {
  content: "₿ Ξ € £ ¥";
  position: fixed;
  inset: -10%;
  font-size: clamp(3rem, 6vw, 6rem);
  color: rgba(232,191,90,.06);
  z-index: -1;
  animation: float 40s linear infinite;
  pointer-events: none;
}
body.dashboard::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,211,106,.18), transparent 24%),
    radial-gradient(circle at 80% 0%, rgba(97,255,194,.14), transparent 28%);
  z-index: -2;
  pointer-events: none;
  animation: driftGlow 12s ease-in-out infinite alternate;
}

/* Line 17: Center auth forms (auth pages only — was leaking onto every page) */
body.auth .container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

/* Line 18: Auth form box — frosted gold-glass card, matching the reference sign-in panel */
.form-box {
  background: linear-gradient(165deg, rgba(12,36,28,.94) 0%, rgba(8,24,20,.97) 100%);
  backdrop-filter: blur(12px);
  padding: 44px 40px 36px;
  border-radius: 18px;
  border: 1px solid rgba(232,191,90,.42);
  box-shadow: 0 24px 70px rgba(0,0,0,.45), 0 0 0 1px rgba(232,191,90,.08) inset;
  width: 380px;
  max-width: 100%;
  text-align: center;
  position: relative;
}
.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin: -76px auto 14px;
}
.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(232,191,90,.35);
  box-shadow: 0 8px 24px rgba(232,191,90,.35);
  background: rgba(255,255,255,.08);
}
/* Line 20-21: Titles */
.form-box h1 { color: #e8bf5a; margin-bottom: 6px; font-size: 26px; font-family: 'Poppins', sans-serif; font-weight: 700; }
.form-box h2 { color: #9db8a9; margin-bottom: 22px; font-size: 15px; font-weight: 400; }

/* Line 22: Inputs */
.form-box input, .form-box select {
  width: 100%;
  padding: 12px 14px;
  margin: 8px 0;
  background: rgba(7,26,20,.7);
  border: 1px solid #234a3a;
  border-radius: 8px;
  color: #eaf5ee;
}
.form-box input:focus, .form-box select:focus { outline: none; border-color: #e8bf5a; }
/* Line 23: Button — gold gradient like the reference "Sign In" button */
.form-box button {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #f4d78a, #e8bf5a 45%, #b8892c);
  color: #1a1200;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  box-shadow: 0 6px 18px rgba(232,191,90,.3);
}
/* Line 24: Links + message */
.form-box a { color: #e8bf5a; text-decoration: none; }
#message { margin-top: 15px; font-weight: bold; min-height: 24px; }

/* Line 25: Dashboard layout */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
/* Line 26: Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #234a3a;
  margin-bottom: 30px;
}
/* Line 27: Logo + logout */
.logo { font-size: 24px; font-weight: 700; color: #e8bf5a; }
.logout-btn {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid #e8bf5a;
  color: #e8bf5a;
  border-radius: 4px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
/* Line 28: Small header stat cards (replace the old bigger duplicate boxes) */
.stat-card-sm, .stat-card {
  background: linear-gradient(135deg, rgba(18,49,39,.96), rgba(11,29,24,.94));
  padding: .6rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(232,191,90,.28);
  min-width: 130px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}

.card, .form-box, .notif-dropdown, .promo-banner {
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
}

button:hover, .btn:hover, .logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.card, .quick-action-card, .promo-banner, .focus-strip {
  opacity: 1;
  transform: none;
}

.card, .quick-action-card, .promo-banner, .btn, .gallery-nav, .notif-item, .site-footer a {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover, .quick-action-card:hover, .promo-banner:hover, .notif-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,.2);
}
.btn:active, .quick-action-card:active, .gallery-nav:active {
  transform: translateY(0) scale(.98);
}
.stat-card-sm {
  animation: softFloat 4s ease-in-out infinite;
}
.stat-card-sm:nth-child(2) {
  animation-delay: 1.2s;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.quick-action-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(25,58,45,.95), rgba(17,38,30,.95));
  border: 1px solid rgba(232,191,90,.24);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
  transition: transform .2s ease, box-shadow .2s ease;
}
.quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.quick-action-icon { font-size: 1.1rem; }
.quick-action-text { font-weight: 700; }

.live-pulse-card {
  overflow: hidden;
}
.live-pulse-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.live-dot {
  font-size: .78rem;
  color: #3ddc97;
  border: 1px solid rgba(61,220,151,.3);
  background: rgba(61,220,151,.12);
  padding: .3rem .55rem;
  border-radius: 999px;
}
.live-pulse-list { display: grid; gap: .55rem; }
.live-pulse-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem .75rem;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}
.live-pulse-symbol { font-weight: 700; color: var(--accent); }
.live-pulse-change.up { color: #3ddc97; }
.live-pulse-change.down { color: #ff5d5d; }

@media (max-width: 700px) {
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Hero section — top layer of the dashboard, background image supplied by admin */
.hero {
  background-image: url("/images/bitcoin-background-rescaled.jpg");
  background-size: cover;
  background-position: center;
  width: 100%;
  min-height: 260px;
  position: relative;
  overflow: hidden;
}
.hero-overlay {
  position: relative;
  background: linear-gradient(180deg, rgba(10,25,47,.55) 0%, rgba(10,25,47,.9) 100%);
  min-height: 260px;
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  overflow: hidden;
}
.hero-glow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  opacity: .8;
  animation: floatOrb 8s ease-in-out infinite;
}
.orb-a {
  width: 220px; height: 220px;
  background: rgba(232,191,90,.18);
  top: -3.5rem; right: -2rem;
}
.orb-b {
  width: 170px; height: 170px;
  background: rgba(97,255,194,.16);
  bottom: -1rem; left: 8%;
  animation-delay: 1.8s;
}
.orb-c {
  width: 120px; height: 120px;
  background: rgba(255,255,255,.12);
  top: 30%; left: 55%;
  animation-delay: 3.2s;
}
.hero-top, .hero-intro, .header-cards {
  position: relative;
  z-index: 1;
}
.header-cards {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .5rem;
}
.header-cards .stat-card-sm {
  min-width: 180px;
  padding: .8rem 1rem;
  border: 1px solid rgba(232,191,90,.34);
  background: linear-gradient(135deg, rgba(20,48,39,.96), rgba(11,30,24,.94));
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.hero-brand-row {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.site-logo-sm { height: 40px; width: auto; border-radius: 6px; }
.hero-live-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(232,191,90,.24);
  color: #f4d78a;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero-live-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: #3ddc97;
  box-shadow: 0 0 8px rgba(61,220,151,.8);
  animation: pulseDot 1.4s ease-in-out infinite;
}
.hero-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.hero-actions-right { margin-left: auto; }
.hero-intro { display: grid; gap: .25rem; }
.hero-title { font-size: 1.6rem; font-weight: 700; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.hero-subtitle { color: rgba(234,245,238,.84); font-size: .95rem; max-width: 560px; }
@media (max-width: 500px) { .hero-title { font-size: 1.25rem; } }

/* Notification bell + dropdown */
.bell-btn { position: relative; font-size: 1.1rem; padding: .5rem .7rem; }
.notif-badge {
  position: absolute; top: -6px; right: -6px;
  background: #ff5d5d; color: #fff; font-size: .7rem; font-weight: 700;
  border-radius: 999px; min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.notif-dropdown {
  position: fixed; top: 4rem; right: 1rem; z-index: 60;
  width: min(360px, calc(100vw - 2rem));
  max-height: 70vh; overflow-y: auto;
  background: #0e261e; border: 1px solid #234a3a; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.notif-dropdown-head {
  padding: .75rem 1rem; font-weight: 700; color: #e8bf5a;
  border-bottom: 1px solid #234a3a;
}
.notif-item { padding: .65rem 1rem; border-bottom: 1px solid #234a3a; font-size: .88rem; }
.notif-item:last-child { border-bottom: none; }

/* Positions box + price chart */
#position-chart-wrap canvas { max-height: 220px; }

/* Flashier promotions banner */
.promo-banner {
  background: linear-gradient(120deg, #1d3b5f 0%, #2a1d4a 50%, #1d3b5f 100%);
  background-size: 200% 200%;
  animation: promo-shimmer 6s ease infinite;
  padding: 1.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e8bf5a;
  text-align: center;
  margin: 1rem 0;
  box-shadow: 0 0 30px rgba(100,255,218,.15);
}
.promo-banner h2 {
  color: #e8bf5a; font-size: 1.3rem; margin-bottom: .5rem;
  text-shadow: 0 0 12px rgba(100,255,218,.5);
}
.promo-media-img { max-width: 100%; border-radius: 8px; margin: .75rem 0; }
@keyframes promo-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes softFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(8px, -10px, 0) scale(1.04); }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: .7; }
}
@keyframes revealIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes driftGlow {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(10px, -8px, 0); }
}

/* Buttons flash red briefly on click for visible feedback */
.btn-flash-red {
  background: #ff5d5d !important;
  color: #fff !important;
  border-color: #ff5d5d !important;
  transition: background .15s ease;
}

/* Featured insight + focus strip */
.featured-insight {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(31,70,54,.96), rgba(17,39,31,.96));
  border: 1px solid rgba(232,191,90,.24);
}
.featured-insight-copy h3 {
  color: #f4d78a;
  margin: .2rem 0 .25rem;
  font-size: 1rem;
}
.featured-insight-copy p {
  color: var(--muted);
  margin: 0;
  font-size: .9rem;
}
.featured-insight-badge {
  padding: .6rem .8rem;
  border-radius: 999px;
  background: rgba(232,191,90,.16);
  color: #f4d78a;
  font-weight: 700;
  border: 1px solid rgba(232,191,90,.24);
}
.focus-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  padding: .95rem 1rem;
  margin-bottom: .25rem;
}
.focus-strip-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.focus-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.focus-pill {
  align-items: flex-start;
  padding: .55rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(232,191,90,.22);
  background: rgba(232,191,90,.12);
}
@media (max-width: 700px) {
  .focus-strip { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
  max-width: 1200px; margin: 2rem auto 0; padding: 1.5rem 1rem 2rem;
  border-top: 1px solid #234a3a; text-align: center;
}
.footer-card {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(232,191,90,.2);
  border-radius: 16px;
  background: rgba(8,24,20,.7);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  margin-bottom: 1rem;
}
.footer-pill-row {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .55rem;
}
.footer-pill {
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(232,191,90,.2);
  background: rgba(232,191,90,.12);
  color: #f4d78a;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
}
.footer-lines { color: #9db8a9; font-size: .85rem; line-height: 1.6; }
.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo { height: 32px; width: auto; opacity: .85; }
.footer-social { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #f4d78a;
  text-decoration: none;
}
.footer-social a:hover {
  transform: translateY(-2px) scale(1.04);
  background: rgba(232,191,90,.18);
}

/* Line 34: Chart box (legacy, kept for compatibility) */
.chart-container {
  background: #0e261e;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #234a3a;
  height: 400px;
} 

:root{
  --bg:#123b2b; --card:linear-gradient(135deg, rgba(25,58,45,.95) 0%, rgba(17,38,30,.95) 100%); --border:rgba(255,220,140,.4); --text:#f5f8f5;
  --muted:#b8d7c2; --accent:#ffd36a; --gold:rgba(255,211,106,0.16); --red:#ff6d6d;
  --pos:#3ddc97; --neg:#ff5d5d;
}
*{box-sizing:border-box}
body{font-family:"Inter",sans-serif;background:linear-gradient(135deg, #123b2b 0%, #1b5a41 45%, #2f7a57 100%);color:var(--text);margin:0;padding:1rem;position:relative;overflow-x:hidden} /* 1rem on mobile */

/* Marketplace / Transact / Home dashboard: the same emerald hex-network
   wallpaper used across the reference design, fixed behind translucent cards */
body.dashboard, body:not(.dashboard):not(.auth) {
  background-image:
    radial-gradient(circle at top left, rgba(255,211,106,.12), transparent 24%),
    linear-gradient(135deg, rgba(18,59,43,.72) 0%, rgba(22,84,60,.76) 45%, rgba(43,114,82,.8) 100%),
    url("/images/bitcoin-background-rescaled.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
body::before{content:"";position:fixed;inset:0;background:radial-gradient(circle at top right, rgba(255,211,106,.16), transparent 24%),radial-gradient(circle at bottom left, rgba(82,255,186,.16), transparent 24%);z-index:-2;pointer-events:none}
@media(min-width:768px){body{padding:1.5rem}} /* desktop bigger */

@keyframes float{0%{transform:translate(0,0) rotate(-25deg)}100%{transform:translate(-50%,-50%) rotate(-25deg)}}
.container{max-width:1200px;margin:0 auto;z-index:1;position:relative}

header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem;gap:.8rem;flex-wrap:wrap} /* wrap for mobile */
.logo{font-size:1.3rem;font-weight:700;color:var(--accent);font-family:"Poppins",sans-serif;letter-spacing:.02em}
@media(min-width:768px){.logo{font-size:1.4rem}}

.hero-glow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  opacity: .8;
  animation: floatOrb 8s ease-in-out infinite;
}
.orb-a { width: 220px; height: 220px; background: rgba(232,191,90,.18); top: -3.5rem; right: -2rem; }
.orb-b { width: 170px; height: 170px; background: rgba(97,255,194,.16); bottom: -1rem; left: 8%; animation-delay: 1.8s; }
.orb-c { width: 120px; height: 120px; background: rgba(255,255,255,.12); top: 30%; left: 55%; animation-delay: 3.2s; }
.hero-intro { position: relative; z-index: 1; display: grid; gap: .2rem; }
.hero-title { font-size: 1.45rem; font-weight: 700; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); margin: 0; }
.hero-subtitle { color: rgba(234,245,238,.84); font-size: .95rem; max-width: 560px; margin: 0; }
.marketplace-header, .transact-hero-top { position: relative; z-index: 1; }
.transact-hero { position: relative; overflow: hidden; padding: 1.2rem 1.2rem 1rem; border-radius: 16px; background: linear-gradient(135deg, rgba(16,46,36,.9), rgba(10,26,22,.95)); border: 1px solid rgba(255,220,140,.24); box-shadow: 0 12px 30px rgba(0,0,0,.16); margin-bottom: 1rem; }
.transact-hero-top { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.marketplace-hero-overlay, .transact-hero { position: relative; overflow: hidden; }

.card, .quick-action-card, .promo-banner, .btn, .gallery-nav, .notif-item, .site-footer a {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover, .quick-action-card:hover, .promo-banner:hover, .notif-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,.2);
}
.btn:active, .quick-action-card:active, .gallery-nav:active {
  transform: translateY(0) scale(.98);
}

@keyframes floatOrb {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(8px,-10px,0) scale(1.04); }
}

.btn{background:var(--card);color:var(--accent);border:1px solid var(--border);padding:.7rem 1.1rem; /* bigger touch */border-radius:8px;cursor:pointer;text-decoration:none;font-weight:600;transition:.2s;font-size:1rem;min-height:44px} /*44px = mobile tap */
.btn:hover{border-color:var(--accent)}
.btn.red{background:var(--red);color:#fff;border-color:var(--red)}

.card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:1rem;backdrop-filter:blur(8px);box-shadow:0 8px 24px rgba(0,0,0,.18)}
.acc-card{padding:.6rem .9rem;min-width:120px} /* don't shrink too much */
.label{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:1px}
.value{font-size:1.5rem;font-weight:700;color:var(--accent)} /* smaller on mobile */
@media(min-width:768px){.value{font-size:1.8rem}}

.grid-2{display:grid;grid-template-columns:1fr;gap:1rem} /* MOBILE = 1 column first */
.grid-2 > div { min-width: 0; } /* allow grid items to shrink below content size, so .table-wrap's own scrollbar contains wide tables instead of the whole page overflowing */
@media(min-width:900px){.grid-2{grid-template-columns:1fr 300px;gap:1.5rem}} /* DESKTOP = 2 column */

input,textarea{width:100%;background:rgba(7,26,20,.7);border:1px solid var(--border);color:var(--text);padding:.9rem;border-radius:8px;font-size:1rem;min-height:44px} /* mobile friendly */

/* Marketplace table fix */
.table-wrap{overflow-x:auto} /* allow horizontal scroll on mobile */
.table{width:100%;border-collapse:collapse;min-width:520px} /* prevent squish */
.table th,.td{padding:.8rem .6rem;font-size:.85rem}
@media(min-width:768px){.table th,.td{padding:10px 14px;font-size:.9rem}}

/* Hot 20 tags bigger for thumb */
.hot-tag{font-size:.85rem;padding:.5rem .8rem}

/* Coin table rows */
.table td { padding:.65rem .5rem; border-bottom:1px solid var(--border); }
.coin-name-cell { display:flex; align-items:center; gap:.5rem; }
.coin-icon { width:24px; height:24px; border-radius:50%; }
.price-cell { font-family:monospace; transition:background .4s ease; }
.change-cell.up { color:#3ddc97; }
.change-cell.down { color:#ff5d5d; }
.flash-up { animation:flash-green .9s ease; }
.flash-down { animation:flash-red .9s ease; }
@keyframes flash-green { 0%{background:rgba(61,220,151,.25);} 100%{background:transparent;} }
@keyframes flash-red   { 0%{background:rgba(255,93,93,.25);} 100%{background:transparent;} }

/* Buy/Sell buttons */
.btn-buy  { background:rgba(61,220,151,.12); border:1px solid rgba(61,220,151,.4); color:#3ddc97; }
.btn-sell { background:rgba(255,93,93,.12); border:1px solid rgba(255,93,93,.4); color:#ff5d5d; }

/* Mover chips (for hot5 / hot20-full) */
.mover-chip { background:var(--surface-2,#141f38); border:1px solid var(--border); border-radius:8px; padding:.4rem .6rem; font-family:monospace; font-size:.78rem; display:flex; gap:.4rem; align-items:center; }
/* ============================================================================
   Added: missing utility classes used by marketplace/transact/about pages,
   golden dialog-box treatment, and better centering/typography for the
   marketplace layout.
   ============================================================================ */

.muted { color: var(--muted); }
.center { text-align: center; }

.btn-primary { background: var(--accent); color: #10131a; border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-block { width: 100%; text-align: center; display: block; }
.btn-row { display: flex; gap: .4rem; justify-content: flex-end; }

.mover-strip { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }
.hot20-box { cursor: pointer; }
.hot5-row, .hot20-grid { display: flex; gap: .6rem; flex-wrap: wrap; margin: .5rem 0; }
.coin-symbol { color: var(--muted); font-size: .78rem; }
.coin-list-head {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr;
  padding: 0 .6rem .6rem; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--border);
}
.badge {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: .2rem .6rem; font-family: monospace; font-size: .75rem;
}
.result-ok { color: #3ddc97; font-size: .85rem; }
.result-no { color: #ff5d5d; font-size: .85rem; }
.field { margin-bottom: .8rem; }
.field label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .05em; }
.wallet-address { font-family: monospace; word-break: break-all; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; }

/* ----------------------------------------------------------------------
   Marketplace: centered, readable column width instead of stretching
   edge-to-edge, without hiding anything — the right-hand column becomes
   a proper sidebar card rather than a bare link.
   ---------------------------------------------------------------------- */
.container { max-width: 1080px; }
.grid-2 > div:last-child .btn { position: sticky; top: 1rem; }
body, .card, input, textarea, select, button { font-family: "Inter", sans-serif; }
.logo, h1, h2, h3 { font-family: "Poppins", "Inter", sans-serif; }

/* ----------------------------------------------------------------------
   Every dialogue box (Hot 20 overlay, Buy/Sell confirmation, chat cards)
   gets a warm gold-to-grey gradient with dark, legible text — replacing
   the plain dark card background used elsewhere on the site.
   ---------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; padding: 1.5rem; overflow: auto;
  background: linear-gradient(160deg, #f4c95d 0%, #d4a942 22%, #6b6153 55%, #3a3630 100%);
}
.overlay-title { color: #1a1200; font-family: "Poppins", sans-serif; }
.overlay-center { display: flex; align-items: center; justify-content: center; }

.dialog {
  max-width: 420px; width: 100%;
  background: linear-gradient(160deg, #f6d488 0%, #cfa54a 35%, #948a7c 70%, #55504a 100%);
  color: #201705;
  border: 1px solid rgba(0,0,0,.15);
}
.dialog-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.dialog-head h3 { margin: 0; color: #201705; }
.dialog-message { color: #33291a; line-height: 1.5; font-size: .92rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.dialog .badge { background: rgba(255,255,255,.35); border-color: rgba(0,0,0,.2); color: #201705; }
.dialog .btn { background: rgba(255,255,255,.35); border-color: rgba(0,0,0,.25); color: #201705; }
.dialog .btn-primary, .dialog .btn-buy, .dialog .btn-sell { background: rgba(255,255,255,.55); color: #201705; border-color: rgba(0,0,0,.3); }

#hot20-overlay .btn { background: rgba(255,255,255,.3); color: #201705; border-color: rgba(0,0,0,.25); }
#hot20-overlay .mover-chip { background: rgba(255,255,255,.35); color: #201705; border-color: rgba(0,0,0,.2); }

/* Responsive tweak: stack the marketplace sidebar under the main column
   on narrow screens without hiding the "Go to Transact" action */
@media (max-width: 900px) {
  .grid-2 > div:last-child .btn { position: static; }
}

/* ----------------------------------------------------------------------
   Header widgets used on marketplace.html/transact.html — were referenced
   in the HTML but never actually defined, so the two account cards were
   stacking full-width instead of sitting side by side in the header.
   ---------------------------------------------------------------------- */
.icon-btn {
  font-size: 1.3rem; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
}
.header-cards { display: flex; gap: .75rem; flex-wrap: wrap; }
.value-sm { font-size: 1rem !important; }

/* ----------------------------------------------------------------------
   Image gallery / slideshow
   ---------------------------------------------------------------------- */
.gallery-wrap { position: relative; }
#gallery-track { position: relative; width: 100%; height: 260px; border-radius: 10px; overflow: hidden; background: var(--bg); }
.gallery-slide { position: absolute; inset: 0; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem .75rem;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: .85rem;
}
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.2rem; height: 2.2rem; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.gallery-prev { left: .5rem; }
.gallery-next { right: .5rem; }
@media (max-width: 500px) { #gallery-track { height: 180px; } }

/* Empty states — icon + message + CTA, replacing bare "No X yet" text */
.empty-state {
  text-align: center; padding: 1.5rem 1rem; color: var(--muted);
}
.empty-state .empty-icon { font-size: 2rem; margin-bottom: .5rem; opacity: .8; }
.empty-state .empty-title { color: var(--text); font-weight: 600; margin-bottom: .25rem; }
.empty-state .empty-subtitle { font-size: .85rem; margin-bottom: .85rem; }
.empty-state .btn { display: inline-block; }

/* WebSocket live-price connection indicator */
.ws-status {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-left: .4rem; vertical-align: middle; background: var(--muted);
  transition: background .3s;
}
.ws-status.live { background: var(--pos); box-shadow: 0 0 6px var(--pos); animation: ws-pulse 2s ease-in-out infinite; }
.ws-status.reconnecting { background: #e8bf5a; }
.ws-status.offline { background: var(--neg); }
@keyframes ws-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* Position chart range toggle (10m / 1h / 24h) */
.chart-range-toggle { display: flex; gap: .4rem; margin: .5rem 0 .75rem; }
.chart-range-btn {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: .35rem .8rem; border-radius: 999px; font-size: .8rem; cursor: pointer; font-weight: 600;
}
.chart-range-btn.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }

/* ----------------------------------------------------------------------
   Notification dropdown: explicit close button so it can always be
   collapsed, plus a transparent full-screen backdrop so tapping anywhere
   outside it also closes it.
   ---------------------------------------------------------------------- */
.notif-dropdown-head { display: flex; align-items: center; justify-content: space-between; }
.notif-close-btn {
  background: none; border: none; color: var(--muted); font-size: 1.1rem;
  cursor: pointer; line-height: 1; padding: .1rem .3rem;
}
.notif-close-btn:hover { color: var(--text); }
.notif-backdrop {
  position: fixed; inset: 0; z-index: 55; background: transparent;
}

/* ----------------------------------------------------------------------
   Promotions banner: gold background per admin request, bold black text
   for legibility against gold, and it now opens into a larger layover
   (modal) that can hold much more text than the strip itself.
   ---------------------------------------------------------------------- */
.promo-banner {
  background: linear-gradient(135deg, #1d3b5f 0%, #2a1d4a 50%, #1d3b5f 100%);
  background-size: 200% 200%;
  animation: promo-shimmer 6s ease infinite;
  padding: 1.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e8bf5a;
  text-align: center;
  margin: 1rem 0;
  box-shadow: 0 0 30px rgba(100,255,218,.15);
}
.promo-banner h2 {
  color: #e8bf5a; font-size: 1.3rem; margin-bottom: .5rem;
  text-shadow: 0 0 12px rgba(100,255,218,.5);
}
.promo-banner #promoText, .promo-banner p { color: #fff; font-weight: 700; }
.promo-banner .muted-hint { color: #e8bf5a; font-weight: 600; font-size: .78rem; margin-top: .5rem; }
.promo-media-img { max-width: 100%; border-radius: 8px; margin: .75rem 0; }

.promo-modal-overlay {
  position: fixed; inset: 0; z-index: 70; padding: 1.5rem; overflow: auto;
  background: rgba(10,15,10,.65); display: flex; align-items: center; justify-content: center;
}
.promo-modal {
  max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto;
  background: linear-gradient(160deg, #fff3c4 0%, #f4c95d 30%, #d4a942 65%, #b8892c 100%);
  color: #1a1200; border-radius: 14px; padding: 1.75rem; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.promo-modal h2 { color: #1a1200; font-weight: 800; margin-bottom: .75rem; }
.promo-modal-body { white-space: pre-line; font-weight: 700; line-height: 1.6; color: #1a1200; }
.promo-modal-link-btn {
  display: inline-block; margin-top: 1rem; padding: .7rem 1rem; border-radius: 999px;
  background: #1a1200; color: #fff3c4; text-decoration: none; font-weight: 700;
}
.promo-modal-close {
  position: absolute; top: .9rem; right: .9rem; background: rgba(0,0,0,.12); border: none;
  color: #1a1200; width: 2rem; height: 2rem; border-radius: 50%; font-size: 1.1rem; cursor: pointer;
}

/* Admin editable textarea for the promo, used on the admin panel — bold
   black text on gold so it visually matches what the user will see. */
.promo-admin-input {
  background: linear-gradient(135deg, #fff3c4 0%, #d4a942 100%) !important;
  color: #1a1200 !important; font-weight: 700 !important;
}

/* ----------------------------------------------------------------------
   Gallery: no title, no frame borders around each slide, and a hint that
   images can be held/pressed to preview larger.
   ---------------------------------------------------------------------- */
.gallery-wrap #gallery-track { border-radius: 10px; border: none; box-shadow: none; }
.gallery-slide img { border: none; }
.gallery-hint { font-size: .72rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.gallery-preview-overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.gallery-preview-overlay img { max-width: 100%; max-height: 90vh; border-radius: 8px; }

/* ----------------------------------------------------------------------
   Mobile money boxes (Airtel / MTN) — sit right next to the crypto
   deposit-addresses box on the Transact page.
   ---------------------------------------------------------------------- */
.mobile-money-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: .75rem; }
@media (min-width: 700px) { .mobile-money-grid { grid-template-columns: 1fr 1fr; } }
.mm-box { border-radius: 10px; padding: .8rem .9rem; }
.mm-airtel { background: linear-gradient(135deg, rgba(255,0,0,.12), rgba(255,0,0,.03)); border: 1px solid rgba(255,60,60,.4); }
.mm-mtn { background: linear-gradient(135deg, rgba(255,204,0,.16), rgba(255,204,0,.03)); border: 1px solid rgba(255,204,0,.5); }
.mm-box .label { font-weight: 700; }
.mm-box .mm-details { font-family: monospace; word-break: break-word; margin-top: .35rem; white-space: pre-line; }

/* ----------------------------------------------------------------------
   Footer social icons — bottom right
   ---------------------------------------------------------------------- */
.site-footer { display: flex; flex-direction: column; gap: .75rem; }
.footer-card {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(232,191,90,.2);
  border-radius: 16px;
  background: rgba(8,24,20,.7);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  margin-bottom: .25rem;
}
.footer-pill-row {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .55rem;
}
.footer-pill {
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(232,191,90,.2);
  background: rgba(232,191,90,.12);
  color: #f4d78a;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
}
.footer-bottom-row {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem;
}
.footer-social { display: flex; gap: .6rem; margin-left: auto; }
.footer-social a {
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--card);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--accent); text-decoration: none; font-size: 1rem;
}
.footer-social a:hover { border-color: var(--accent); transform: translateY(-2px) scale(1.04); }

/* ----------------------------------------------------------------------
   Account status banner (warned / suspended)
   ---------------------------------------------------------------------- */
.account-status-banner {
  border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1rem; font-weight: 600; font-size: .9rem;
}
.account-status-banner.warned { background: rgba(255,193,7,.12); border: 1px solid rgba(255,193,7,.5); color: #ffc107; }
.account-status-banner.suspended { background: rgba(255,93,93,.12); border: 1px solid rgba(255,93,93,.5); color: #ff5d5d; }

/* ----------------------------------------------------------------------
   Referral bonus box (distinct from account balance)
   ---------------------------------------------------------------------- */
.referral-bonus-box { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--border); }
.referral-bonus-amount { font-size: 1.3rem; font-weight: 700; color: #f4c95d; }

/* Marketplace upper-page background image */
.marketplace-hero {
  background-image: url("/images/dashboard-mid.png");
  background-size: cover; background-position: center;
  border-radius: 12px; overflow: hidden; margin-bottom: 1rem;
}
.marketplace-hero-overlay {
  background: linear-gradient(180deg, rgba(10,25,47,.55) 0%, rgba(10,25,47,.92) 100%);
  padding: 1.25rem 1.5rem 1.5rem; min-height: 180px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .75rem;
}

body.chat-page {
  font-family: "Inter", sans-serif;
  background-image:
    radial-gradient(circle at top left, rgba(255,221,107,.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(51,216,130,.16), transparent 28%),
    linear-gradient(135deg, #082b1e 0%, #0f4a31 45%, #1e6e48 100%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: #f4f6ed;
  min-height: 100vh;
}

.chat-page .chat-hero {
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(18,70,45,.95), rgba(10,35,24,.96));
  border: 1px solid rgba(255,211,106,.18);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  padding: 2rem;
  margin-bottom: 1rem;
}
.chat-page .chat-hero h1,
.chat-page .chat-hero p {
  color: #f8e8a1;
}
.chat-page .chat-hero p {
  max-width: 720px;
}
.chat-page .chat-messages {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: calc(100vh - 440px);
  overflow-y: auto;
  padding: .9rem;
  border-radius: 20px;
  background: rgba(9,31,22,.72);
  border: 1px solid rgba(255,255,255,.08);
}
.chat-page .chat-message {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-width: 84%;
}
.chat-page .chat-message.admin { align-self: flex-start; }
.chat-page .chat-message.member { align-self: flex-end; }
.chat-page .chat-bubble {
  background: rgba(34,72,48,.92);
  color: #f4f6ed;
  border-radius: 18px;
  padding: .95rem 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.chat-page .chat-message.member .chat-bubble {
  background: linear-gradient(135deg, rgba(255,211,106,.96), rgba(239,168,58,.92));
  color: #10131a;
}
.chat-page .chat-meta {
  font-size: .75rem;
  color: rgba(245,248,245,.72);
}
.chat-page .chat-action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
  align-items: center;
  margin-top: 1rem;
}
.chat-page .chat-share {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.chat-page .chat-share input { flex: 1; min-width: 0; }
.chat-page .chat-file { display:flex; gap:.75rem; align-items:center; margin-top:.75rem; }
.chat-page img.chat-media,
.chat-page video.chat-media {
  max-width: 100%;
  border-radius: 14px;
  margin-top: .5rem;
}
.chat-page .chat-card { padding: 1rem; }
