/* =========================================================
   FlowSouq public/auth compatibility layer
   Loaded only by base_public.html.
   ========================================================= */

:root{
  --fp-bg:#f6f5f2;
  --fp-surface:#fff;
  --fp-soft:#f0eee9;
  --fp-ink:#171717;
  --fp-muted:#6f6b64;
  --fp-line:#dedbd4;
  --fp-danger:#994039;
  --fp-radius:18px;
  --fp-shadow:0 18px 48px rgba(20,20,20,.06);
  --fp-shell:1120px;
}

body{
  margin:0;
}

.fs-public-page{
  min-height:100vh;
  background:var(--fp-bg);
  color:var(--fp-ink);
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
}

.fs-public-wrap{
  min-height:100vh;
}

.fs-public-content{
  width:min(calc(100% - 32px),var(--fp-shell));
  margin:0 auto;
  padding:28px 0 56px;
}

.fs-public-topbar-shell{
  position:sticky;
  top:0;
  z-index:50;
  border-bottom:1px solid rgba(23,23,23,.08);
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.fs-public-topbar{
  width:min(calc(100% - 32px),var(--fp-shell));
  min-height:68px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.fs-public-brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--fp-ink);
  text-decoration:none;
}

.fs-public-brand-logo{
  width:38px;
  height:38px;
  object-fit:contain;
  border-radius:10px;
}

.fs-public-brand-copy{
  display:grid;
  gap:2px;
}

.fs-public-brand-copy strong{
  font-size:.82rem;
  font-weight:850;
}

.fs-public-brand-copy span{
  color:var(--fp-muted);
  font-size:.58rem;
}

/* Cards */
.fs-card,
.fs-panel{
  border:1px solid var(--fp-line);
  border-radius:var(--fp-radius);
  background:var(--fp-surface);
  box-shadow:var(--fp-shadow);
}

.fs-panel-body,
.fs-card-body{
  padding:22px;
}

.fs-section-title,
.fs-page-kicker{
  color:#8b867e;
  font-size:.61rem;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.fs-title-md{
  margin:7px 0 6px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.35rem;
  font-weight:500;
}

.fs-copy{
  margin:0;
  color:var(--fp-muted);
  font-size:.72rem;
  line-height:1.65;
}

.fs-stack{
  display:grid;
  gap:10px;
}

/* Auth */
.fs-auth-shell{
  width:min(100%,980px);
  margin:0 auto;
  padding:clamp(26px,6vw,72px) 0;
}

.fs-auth-grid{
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(260px,.82fr);
  gap:16px;
  align-items:start;
}

.fs-auth-panel{
  overflow:hidden;
}

.fs-auth-panel-body{
  padding:clamp(22px,4vw,34px);
}

.fs-auth-kicker{
  margin-bottom:16px;
}

.fs-auth-title{
  margin:0;
  max-width:620px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(2rem,5vw,3.5rem);
  line-height:.98;
  letter-spacing:-.045em;
  font-weight:500;
}

.fs-auth-copy{
  margin:14px 0 0;
  max-width:610px;
  color:var(--fp-muted);
  font-size:.78rem;
  line-height:1.65;
}

.fs-auth-form{
  display:grid;
  gap:14px;
  margin-top:26px;
}

.fs-auth-meta{
  display:grid;
  gap:8px;
  margin-top:20px;
  padding-top:17px;
  border-top:1px solid var(--fp-line);
  color:var(--fp-muted);
  font-size:.64rem;
  line-height:1.55;
}

.fs-auth-meta a{
  color:var(--fp-ink);
  font-weight:800;
  text-decoration:none;
}

.fs-auth-mini{
  display:grid;
  gap:8px;
}

.fs-auth-mini h3{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.25rem;
  font-weight:500;
}

.fs-auth-mini p{
  margin:0;
  color:var(--fp-muted);
  font-size:.68rem;
  line-height:1.6;
}

/* Forms */
.fs-field{
  display:grid;
  gap:7px;
}

.fs-field label,
.fs-label{
  color:#56514a;
  font-size:.62rem;
  font-weight:800;
}

.fs-field input:not([type="checkbox"]):not([type="radio"]),
.fs-field textarea,
.fs-field select,
.fs-auth-form input:not([type="checkbox"]):not([type="radio"]){
  width:100%;
  min-height:46px;
  box-sizing:border-box;
  padding:11px 12px;
  border:1px solid #cfcbc4;
  border-radius:11px;
  background:#fff;
  color:var(--fp-ink);
  outline:none;
  font:inherit;
  font-size:16px;
}

.fs-field input:focus,
.fs-field textarea:focus,
.fs-field select:focus{
  border-color:#77716a;
  box-shadow:0 0 0 3px rgba(0,0,0,.04);
}

.fs-field-error{
  color:var(--fp-danger);
  font-size:.61rem;
  line-height:1.45;
}

.fs-check-row{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:9px;
  align-items:start;
  line-height:1.5;
}

.fs-check-row input{
  width:17px;
  height:17px;
  margin-top:2px;
  accent-color:#171717;
}

/* Buttons */
.fs-btn{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  box-sizing:border-box;
  padding:0 14px;
  border:1px solid #cbc7c0;
  border-radius:10px;
  background:#fff;
  color:#34312d;
  text-decoration:none;
  font:inherit;
  font-size:.67rem;
  font-weight:850;
  cursor:pointer;
}

.fs-btn-primary{
  border-color:#171717;
  background:#171717;
  color:#fff;
}

.fs-btn-danger{
  border-color:var(--fp-danger);
  background:var(--fp-danger);
  color:#fff;
}

.fs-btn-block{
  width:100%;
}

.fs-btn[disabled]{
  opacity:.65;
  cursor:wait;
}

.fs-action-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:9px;
}

.fs-action-stack{
  display:grid;
  gap:9px;
}

/* Pills / alerts */
.fs-pill,
.fs-pill-accent{
  display:inline-flex;
  align-items:center;
  width:max-content;
  min-height:26px;
  padding:0 9px;
  border:1px solid var(--fp-line);
  border-radius:999px;
  background:#f4f2ee;
  color:#625e57;
  font-size:.57rem;
  font-weight:850;
}

.fs-pill-accent{
  border-color:#e6d7cb;
  background:#f8eee7;
  color:#7a4933;
}

.fs-pill-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}

.fs-alert,
.fs-flash{
  padding:11px 13px;
  border:1px solid var(--fp-line);
  border-radius:10px;
  background:#fff;
  font-size:.66rem;
  line-height:1.5;
}

.fs-alert-danger,
.fs-flash.error{
  border-color:#efd4d0;
  background:#fff4f2;
  color:#8d3d35;
}

.fs-flash.success{
  border-color:#d7e7da;
  background:#f3f8f4;
  color:#42624a;
}

.fs-flash-wrap{
  width:min(calc(100% - 32px),var(--fp-shell));
  margin:14px auto 0;
  display:grid;
  gap:8px;
}

/* Welcome */
.fs-app-welcome{
  width:min(100%,680px);
  margin:0 auto;
  padding:clamp(30px,7vw,76px) 0;
}

.fs-app-welcome-card{
  padding:clamp(22px,5vw,38px);
  border:1px solid var(--fp-line);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--fp-shadow);
}

.fs-app-brand{
  text-align:center;
}

.fs-app-logo{
  width:68px;
  height:68px;
  margin:0 auto 18px;
  object-fit:contain;
}

.fs-app-brand h1{
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(2rem,6vw,3.5rem);
  line-height:1;
  letter-spacing:-.045em;
  font-weight:500;
}

.fs-app-brand p{
  max-width:540px;
  margin:15px auto 0;
  color:var(--fp-muted);
  font-size:.76rem;
  line-height:1.65;
}

.fs-app-actions{
  display:grid;
  gap:9px;
  margin-top:28px;
}

/* Old public/pricing */
.fs-public-section,
.fs-pricing-shell{
  width:min(100%,var(--fp-shell));
  margin:0 auto;
}

.fs-pricing-hero{
  margin-bottom:18px;
  padding:clamp(22px,4vw,34px);
  border:1px solid var(--fp-line);
  border-radius:20px;
  background:#fff;
}

.fs-pricing-title{
  margin:7px 0 8px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(2rem,5vw,3.5rem);
  line-height:1;
  font-weight:500;
}

.fs-pricing-copy{
  max-width:720px;
  margin:0;
  color:var(--fp-muted);
  line-height:1.65;
}

.fs-pricing-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.fs-price-card{
  overflow:hidden;
}

.fs-price-top,
.fs-price-actions,
.fs-summary-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.fs-price-value{
  display:flex;
  align-items:baseline;
  gap:5px;
  margin:18px 0;
}

.fs-price-value strong{
  font-family:Georgia,"Times New Roman",serif;
  font-size:2rem;
  font-weight:500;
}

.fs-price-list{
  display:grid;
  gap:10px;
  margin:16px 0;
}

.fs-price-item{
  display:grid;
  grid-template-columns:22px 1fr;
  gap:8px;
  color:var(--fp-muted);
  font-size:.68rem;
  line-height:1.5;
}

.fs-status-box,
.fs-warning,
.fs-note{
  padding:13px 14px;
  border:1px solid var(--fp-line);
  border-radius:12px;
  background:#f7f5f1;
  font-size:.67rem;
  line-height:1.55;
}

/* Existing public drawer */
.fs-store-drawer-overlay{
  position:fixed;
  inset:0;
  z-index:90;
  background:rgba(0,0,0,.28);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.fs-store-drawer-overlay.is-open{
  opacity:1;
  pointer-events:auto;
}

.fs-store-drawer{
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  z-index:100;
  width:min(390px,92vw);
  transform:translateX(102%);
  transition:transform .2s ease;
  border-left:1px solid var(--fp-line);
  background:#fff;
}

.fs-store-drawer.is-open{
  transform:translateX(0);
}

.fs-store-drawer-inner{
  height:100%;
  overflow:auto;
  padding:22px;
}

.fs-store-drawer-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:22px;
}

.fs-store-drawer-copy{
  display:grid;
  gap:22px;
}

.fs-store-drawer-copy a{
  color:var(--fp-ink);
  text-decoration:none;
}

/* Auth spinner */
.fs-upload-spinner{
  width:15px;
  height:15px;
  display:inline-block;
  border:2px solid rgba(255,255,255,.38);
  border-top-color:currentColor;
  border-radius:50%;
  animation:fp-spin .7s linear infinite;
}

@keyframes fp-spin{
  to{transform:rotate(360deg)}
}

@media(max-width:760px){
  .fs-public-content{
    width:min(calc(100% - 24px),var(--fp-shell));
    padding:20px 0 42px;
  }

  .fs-auth-grid,
  .fs-pricing-grid{
    grid-template-columns:1fr;
  }

  .fs-auth-shell{
    padding:22px 0 40px;
  }

  .fs-auth-grid > article:not(:first-child){
    display:none;
  }

  .fs-auth-panel-body,
  .fs-panel-body,
  .fs-card-body{
    padding:18px;
  }

  .fs-public-brand-copy span{
    display:none;
  }
}
