@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&display=swap');

:root{
  --bg:#0b0f14;
  --bg-elev:#10161d;
  --panel:#121922;
  --panel-2:#18212c;
  --panel-3:#1d2834;
  --line:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.14);
  --text:#edf3f9;
  --muted:#98a6b7;
  --soft:#c8d3df;
  --primary:#7dd3c7;
  --primary-2:#9fd7ff;
  --primary-deep:#17353a;
  --success:#7ee081;
  --danger:#ff7b87;
  --warning:#ffcc7a;
  --shadow:0 10px 30px rgba(0,0,0,.28);
  --shadow-lg:0 20px 60px rgba(0,0,0,.38);
  --radius-sm:12px;
  --radius-md:18px;
  --radius-lg:24px;
  --radius-xl:32px;
  --container:1240px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:
    radial-gradient(circle at top left, rgba(125,211,199,.08), transparent 28%),
    radial-gradient(circle at top right, rgba(159,215,255,.08), transparent 24%),
    linear-gradient(180deg,#0a0f14 0%,#0b1016 100%);
  color:var(--text);
  font-family:'Satoshi',system-ui,sans-serif;
  font-size:16px;
  line-height:1.6;
  min-height:100vh;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.container{width:min(var(--container),calc(100% - 32px));margin:0 auto}
.page-shell{padding:32px 0 110px}
.page-stack{display:grid;gap:20px}
.stack{display:grid;gap:16px}
.grid-2{display:grid;grid-template-columns:1.2fr .8fr;gap:20px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.grid-form-2{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.row-between{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.inline-actions,.actions-stack{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.actions-stack{margin-top:18px}
.spacer-top{margin-top:12px}
.spacer-md{margin-top:18px}

.topbar{
  position:sticky;top:0;z-index:40;
  backdrop-filter:blur(18px);
  background:rgba(8,12,18,.72);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.topbar-inner{
  width:min(var(--container),calc(100% - 32px));
  margin:0 auto;
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
}
.brand img{
  height:36px;
  width:auto;
}
.nav{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.nav a,.nav-inline-form button{
  color:var(--muted);
  background:transparent;
  border:1px solid transparent;
  padding:10px 14px;
  border-radius:999px;
  font-weight:600;
  transition:.2s ease;
}
.nav a:hover,.nav-inline-form button:hover{
  color:var(--text);
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.05);
}
.primary-link{
  color:#081016 !important;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  box-shadow:0 8px 20px rgba(125,211,199,.18);
}
.primary-link:hover{filter:brightness(1.03)}

.hero-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:20px;
  align-items:stretch;
}
.card,
.market-card,
.owner-card{
  background:linear-gradient(180deg,rgba(19,26,35,.92),rgba(16,22,29,.96));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  border-radius:var(--radius-lg);
}
.card{padding:24px}
.card-soft{
  background:linear-gradient(180deg,rgba(22,31,41,.96),rgba(18,26,35,.96));
}
.hero-main{
  padding:30px;
  min-height:100%;
}
.panel{
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  border-radius:20px;
  padding:18px;
}
.page-title{
  margin:8px 0 0;
  font-size:clamp(2rem,3.6vw,4.2rem);
  line-height:1.02;
  letter-spacing:-.05em;
  max-width:14ch;
}
.page-title.compact{
  font-size:clamp(2rem,3vw,3.2rem);
  max-width:18ch;
}
.lead{
  margin:14px 0 0;
  color:var(--soft);
  font-size:1.05rem;
  max-width:66ch;
}
.section-title,
.auth-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--primary);
  font-size:.78rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:800;
}
.section-heading,
.section-heading-sm,
.section-heading-auth{
  margin:8px 0 0;
  letter-spacing:-.04em;
  line-height:1.08;
}
.section-heading{font-size:2rem}
.section-heading-sm{font-size:1.3rem}
.section-heading-auth{font-size:2.2rem}
.muted{color:var(--muted)}
.prose{color:var(--soft);white-space:pre-wrap}

.stat-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-top:24px;
}
.stat{
  padding:18px;
  border-radius:20px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
}
.stat strong,
.kpi-value{
  display:block;
  font-size:1.8rem;
  font-weight:900;
  letter-spacing:-.04em;
  color:var(--text);
}
.kpi{display:grid;gap:8px}

label{
  display:block;
  margin:0 0 8px;
  color:var(--soft);
  font-size:.95rem;
  font-weight:600;
}
input,select,textarea{
  width:100%;
  border:1px solid rgba(255,255,255,.08);
  background:#0f151d;
  color:var(--text);
  border-radius:16px;
  padding:14px 16px;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
textarea{min-height:150px;resize:vertical}
input::placeholder,textarea::placeholder{color:#6f7d8d}
input:focus,select:focus,textarea:focus{
  border-color:rgba(125,211,199,.55);
  box-shadow:0 0 0 4px rgba(125,211,199,.12);
  background:#111922;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 18px;
  border-radius:16px;
  border:1px solid transparent;
  font-weight:700;
  letter-spacing:-.01em;
  transition:transform .14s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn-primary{
  color:#081016;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  box-shadow:0 14px 28px rgba(125,211,199,.15);
}
.btn-dark{
  color:var(--text);
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.08);
}
.btn-ghost{
  color:var(--soft);
  background:transparent;
  border-color:rgba(255,255,255,.09);
}
.btn-danger,.nav .btn-danger{
  color:#fff;
  background:rgba(255,123,135,.14);
  border-color:rgba(255,123,135,.26);
}
.btn-danger:hover{background:rgba(255,123,135,.2)}

.badge,
.meta-pill,
.score-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:32px;
  padding:6px 11px;
  border-radius:999px;
  font-size:.83rem;
  font-weight:700;
  border:1px solid transparent;
}
.badge-demand{
  color:#ffd8b0;
  background:rgba(255,170,91,.12);
  border-color:rgba(255,170,91,.2);
}
.badge-supply{
  color:#bff7d1;
  background:rgba(65,191,112,.12);
  border-color:rgba(65,191,112,.2);
}
.badge-neutral,.meta-pill{
  color:#d5dfeb;
  background:rgba(255,255,255,.045);
  border-color:rgba(255,255,255,.06);
}
.score-pill{
  color:#081016;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
}

.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:20px;
  margin:4px 0 18px;
}
.listing-section{display:grid;gap:18px}
.market-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.market-card{
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:16px;
  min-height:100%;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.market-card:hover,
.owner-card:hover{
  transform:translateY(-3px);
  border-color:rgba(125,211,199,.22);
  box-shadow:var(--shadow-lg);
}
.market-card-top,
.owner-card-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.market-card-title,
.owner-card-title{
  margin:0;
  font-size:1.25rem;
  line-height:1.18;
  letter-spacing:-.03em;
}
.market-card-desc{
  margin:0;
  color:var(--muted);
}
.market-card-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.market-card-footer{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:4px;
}
.market-card-link{
  color:var(--primary);
  font-weight:700;
}

.detail-layout{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) 360px;
  gap:20px;
  align-items:start;
}
.detail-hero{display:grid;gap:20px}
.detail-meta-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.detail-meta-box{
  display:grid;
  gap:6px;
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  color:var(--soft);
}
.detail-meta-box strong{
  color:var(--text);
  font-size:.85rem;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.listing-row{
  padding:18px 0;
  border-top:1px solid rgba(255,255,255,.06);
}
.listing-row:first-child{border-top:0;padding-top:0}
.price{
  color:var(--text);
  font-weight:800;
}
.meta-stack{display:grid;gap:12px}
.meta-row{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  border-top:1px solid rgba(255,255,255,.06);
}
.meta-row:first-child{border-top:0;padding-top:0}

.notice,
.error{
  padding:14px 16px;
  border-radius:16px;
  border:1px solid;
}
.notice.success{
  color:#d8ffe1;
  background:rgba(57,168,95,.14);
  border-color:rgba(57,168,95,.25);
}
.notice.error,.error{
  color:#ffd6dc;
  background:rgba(255,88,108,.12);
  border-color:rgba(255,88,108,.24);
}
.empty-state{
  padding:26px;
  border-radius:22px;
  border:1px dashed rgba(255,255,255,.11);
  background:rgba(255,255,255,.025);
  color:var(--muted);
}

.auth-page{
  min-height:100vh;
  display:grid;
  align-items:center;
  padding:34px 0;
}
.auth-shell{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:22px;
}
.auth-panel,
.auth-card{
  padding:30px;
}
.auth-panel{
  min-height:580px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.auth-logo{height:40px;width:auto}
.auth-brand{margin-bottom:20px}
.feature-list,
.auth-points{
  display:grid;
  gap:12px;
  padding:0;
  margin:24px 0 0;
  list-style:none;
}
.feature-list li,
.auth-point{
  padding:14px 16px;
  border-radius:18px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  color:var(--soft);
}

.owner-card{padding:20px}
.mobile-nav{
  position:fixed;
  left:12px;right:12px;bottom:12px;
  display:none;
  padding:10px;
  background:rgba(11,15,20,.92);
  border:1px solid rgba(255,255,255,.07);
  border-radius:22px;
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow-lg);
  z-index:45;
}
.mobile-nav a{
  flex:1;
  text-align:center;
  padding:10px 8px;
  border-radius:14px;
  color:var(--muted);
  font-weight:700;
  font-size:.92rem;
}
.mobile-nav a:hover{background:rgba(255,255,255,.04);color:var(--text)}

.inline-form,.nav-inline-form{display:inline}
form{display:grid;gap:16px}
form.inline-form, .inline-actions form, .nav-inline-form{display:inline-block;gap:0}
hr{border:none;border-top:1px solid rgba(255,255,255,.06);margin:10px 0}

@media (max-width: 1080px){
  .hero-grid,.grid-2,.detail-layout,.auth-shell{grid-template-columns:1fr}
  .market-grid,.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 780px){
  .topbar-inner{min-height:70px}
  .nav{display:none}
  .container{width:min(var(--container),calc(100% - 20px))}
  .page-shell{padding:18px 0 100px}
  .card,.hero-main,.auth-panel,.auth-card,.owner-card,.market-card{padding:18px}
  .market-grid,.grid-3,.stat-grid,.detail-meta-grid,.grid-form-2{grid-template-columns:1fr}
  .row-between,.section-head,.market-card-top,.owner-card-header{flex-direction:column;align-items:flex-start}
  .page-title{font-size:clamp(2rem,10vw,3rem);max-width:12ch}
  .page-title.compact{font-size:clamp(1.8rem,8vw,2.5rem)}
  .mobile-nav{display:flex;gap:8px}
}
