/* ============================================================
   NUOVA International — pages.css
   Page-specific layout styles, organized by page.
   Load AFTER base.css and components.css.
   ============================================================ */

/* ============================================================
   SHARED: hero brand text slogan line
   ============================================================ */
.hero h1 .zh-h1{
  display:block;
  font-size:0.46em;
  font-weight:700;
  color:var(--slate);
  margin-top:14px;
  letter-spacing:0;
}
.hero h1 .zh-h1 .slogan{
  display:block;
  margin-top:6px;
  font-size:0.82em;
  font-weight:700;
  color:var(--gold);
  letter-spacing:0.04em;
}
.hero h1 .accent{ color:var(--navy); }

/* ============================================================
   HOME — HERO
   ============================================================ */
.hero{
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(15,76,129,0.07), transparent 60%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 78%);
  padding:72px 0 88px;
  overflow:hidden;
  border-bottom:1px solid var(--line);
}
.hero .container{
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  gap:56px;
  align-items:center;
}
.hero-copy{ min-width:0; }
.hero-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border:1px solid var(--line);
  padding:6px 14px 6px 10px;
  border-radius:30px;
  font-size:12.5px;
  font-weight:700;
  color:var(--navy);
  box-shadow:var(--shadow-sm);
  margin-bottom:22px;
}
.hero-sub{ margin-top:22px; font-size:17px; color:var(--slate); max-width:560px; line-height:1.7; }
.hero-sub .zh{ margin-top:8px; color:var(--slate-light); }
.hero-actions{ display:flex; gap:14px; margin-top:34px; flex-wrap:wrap; }

.hero-stats{
  display:flex;
  gap:0;
  margin-top:44px;
  border-top:1px solid var(--line);
  padding-top:24px;
}
.hero-stat{ flex:1; padding-right:24px; border-right:1px solid var(--line); }
.hero-stat:last-child{ border-right:none; padding-right:0; }
.hero-stat strong{ display:block; font-size:25px; font-weight:800; color:var(--navy); letter-spacing:-0.01em; }
.hero-stat span{ display:block; font-size:12.5px; color:var(--slate); margin-top:4px; font-weight:600; }

/* ---- Hero dossier card (signature element) ---- */
.dossier-wrap{ position:relative; display:flex; justify-content:center; }
.dossier-card{
  width:100%;
  max-width:400px;
  background:#fff;
  border-radius:14px;
  border:1px solid var(--line);
  box-shadow:var(--shadow-lg);
  overflow:hidden;
  position:relative;
  z-index:2;
}
.dossier-head{
  background:linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color:#fff;
  padding:20px 22px;
  position:relative;
}
.dossier-head::after{
  content:"";
  position:absolute; inset:0;
  background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 14px);
  pointer-events:none;
}
.dossier-head-top{ display:flex; justify-content:space-between; align-items:flex-start; }
.dossier-badge{
  font-size:10px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase;
  background:rgba(255,255,255,0.15); padding:4px 9px; border-radius:3px;
}
.dossier-rating{ text-align:right; }
.dossier-rating strong{ font-size:22px; font-weight:800; color:var(--gold-light); display:block; line-height:1; }
.dossier-rating span{ font-size:10px; opacity:0.8; text-transform:uppercase; letter-spacing:0.08em; }
.dossier-name{ font-size:17px; font-weight:700; margin-top:18px; }
.dossier-name small{ display:block; font-size:12px; font-weight:500; opacity:0.75; margin-top:2px; }
.dossier-code{ font-family:var(--mono); font-size:12px; letter-spacing:0.04em; margin-top:10px; opacity:0.9; }

.dossier-body{ padding:20px 22px 22px; display:flex; gap:18px; }
.dossier-qr{
  flex-shrink:0; width:104px; height:104px; border-radius:8px;
  border:1px solid var(--line); display:flex; align-items:center; justify-content:center;
  background:#fff; padding:8px;
}
.dossier-qr svg{ width:100%; height:100%; }
.dossier-meta{ flex:1; min-width:0; }
.dossier-meta-row{ display:flex; justify-content:space-between; font-size:12.5px; padding:6px 0; border-bottom:1px dashed var(--line); }
.dossier-meta-row:last-child{ border-bottom:none; }
.dossier-meta-row .k{ color:var(--slate); }
.dossier-meta-row .v{ font-weight:700; color:var(--ink); }
.dossier-meta-row .v.good{ color:var(--green); }

.dossier-channels{ display:flex; gap:8px; padding:0 22px 20px; flex-wrap:wrap; }

.dossier-float{
  position:absolute; background:#fff; border:1px solid var(--line); border-radius:10px;
  box-shadow:var(--shadow-md); padding:12px 14px; font-size:12px; font-weight:700;
  z-index:3; display:flex; align-items:center; gap:8px;
}
.dossier-float.f1{ top:-18px; right:-10px; color:var(--green); }
.dossier-float.f2{ bottom:24px; left:-28px; color:var(--navy); }
.dossier-float .ic{
  width:22px;height:22px; border-radius:50%; background:var(--bg-deep);
  display:flex;align-items:center;justify-content:center; flex-shrink:0;
}

/* ============================================================
   TRUST / LOGO STRIP
   ============================================================ */
.trust-strip{ background:var(--bg-soft); border-bottom:1px solid var(--line); padding:26px 0; }
.trust-strip .container{ display:flex; align-items:center; gap:36px; flex-wrap:wrap; justify-content:space-between; }
.trust-strip-label{ font-size:12px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:var(--slate); white-space:nowrap; }
.trust-logos{ display:flex; gap:34px; flex-wrap:wrap; align-items:center; opacity:0.85; }
.trust-logo{ font-weight:800; font-size:15px; color:var(--slate); letter-spacing:0.01em; white-space:nowrap; }

/* ============================================================
   FEATURE CARDS (4 core advantages)
   ============================================================ */
.features{ padding:96px 0; }
.feature-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }
.feature-card{
  min-width:0;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg);
  padding:30px 26px; box-shadow:var(--shadow-sm);
  transition:box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  display:flex; flex-direction:column;
}
.feature-card:hover{ box-shadow:var(--shadow-md); transform:translateY(-3px); border-color:#D7E2EC; }
.feature-num{ font-family:var(--mono); font-size:12px; font-weight:700; color:var(--gold); letter-spacing:0.08em; }
.feature-icon{
  width:50px;height:50px; border-radius:10px; background:var(--bg-soft); border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center; margin:16px 0 20px; color:var(--navy);
}
.feature-icon svg{ width:24px; height:24px; }
.feature-card h3{ font-size:17px; margin-bottom:4px; }
.feature-card .zh{ font-size:13px; color:var(--slate-light); margin-bottom:12px; }
.feature-card p{ font-size:14px; color:var(--slate); line-height:1.65; flex:1; }
.feature-card .feature-foot{
  margin-top:18px; padding-top:14px; border-top:1px solid var(--line-soft);
  font-size:12.5px; font-weight:700; color:var(--navy); display:flex; align-items:center; gap:6px;
}

/* ============================================================
   QUERY / SEARCH PANEL (home preview)
   ============================================================ */
.query{
  background:linear-gradient(135deg, #0F4C81 0%, #0A3A63 100%);
  padding:64px 0;
  position:relative;
  overflow:hidden;
}
.query::before{
  content:"";
  position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size:42px 42px;
  mask-image:radial-gradient(ellipse at center, black 10%, transparent 75%);
  pointer-events:none;
}
.query .container{ position:relative; z-index:1; }
.query-inner{ max-width:760px; margin:0 auto; text-align:center; }
.query-inner h2{ color:#fff; font-size:clamp(24px,3vw,32px); margin-top:12px; }
.query-inner p{ color:#C7D9EA; margin-top:12px; font-size:15px; }
.query .search-box{ margin-top:32px; }
.search-tags{ margin-top:16px; display:flex; gap:10px; justify-content:center; flex-wrap:wrap; font-size:12.5px; }
.search-tags span{ color:#9FB8D1; }
.search-tags a{ color:#E3EDF7; font-weight:600; border-bottom:1px dotted rgba(227,237,247,0.5); }
.search-tags a:hover{ color:#fff; }

/* ============================================================
   SERVICE CARDS (home preview + services page)
   ============================================================ */
.services{ padding:96px 0; background:var(--bg-soft); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.service-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.service-card{ overflow:hidden; display:flex; flex-direction:column; position:relative; min-width:0; }
.service-card.featured{ border-color:var(--navy); }
.service-ribbon{
  position:absolute; top:14px; right:-32px; background:var(--gold); color:#fff;
  font-size:11px; font-weight:800; padding:4px 36px; transform:rotate(40deg); letter-spacing:0.05em;
}
.service-top{ padding:26px 26px 0; }
.service-top .plan-name{ font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--navy); }
.service-top h3{ font-size:22px; font-weight:800; margin-top:8px; }
.service-top .price{ font-size:14px; color:var(--slate); margin-top:6px; }
.service-top .price strong{ font-size:15px; color:var(--ink); }
.service-list{ padding:20px 26px 26px; flex:1; }
.service-list li{ display:flex; gap:10px; font-size:13.5px; color:var(--slate); padding:7px 0; align-items:flex-start; }
.service-list li svg{ flex-shrink:0; width:16px; height:16px; margin-top:2px; color:var(--green); }
.service-foot{ padding:0 26px 26px; }

/* ============================================================
   PARTNERS
   ============================================================ */
.partners{ padding:96px 0; }
.partner-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.partner-card{ padding:30px; text-align:center; min-width:0; }
.partner-mark{
  width:64px;height:64px; border-radius:50%; margin:0 auto 18px;
  display:flex;align-items:center;justify-content:center; font-weight:800; font-size:20px; color:#fff;
}
.partner-card h4{ font-size:16px; }
.partner-card .zh{ font-size:12.5px; color:var(--slate-light); margin-top:3px; }
.partner-card p{ font-size:13.5px; color:var(--slate); margin-top:10px; line-height:1.6; }

/* ============================================================
   CASES
   ============================================================ */
.cases{ padding:96px 0; background:var(--bg-soft); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.case-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.case-card{ overflow:hidden; min-width:0; }
.case-thumb{ height:150px; position:relative; display:flex; align-items:flex-end; padding:16px; overflow:hidden; }
.case-thumb::before{
  content:""; position:absolute; inset:0;
  background-image:repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 10px, transparent 10px 20px);
}
.case-thumb .industry-tag{
  position:relative; z-index:1; background:rgba(255,255,255,0.92); color:var(--navy);
  font-size:11px; font-weight:800; padding:4px 10px; border-radius:3px; text-transform:uppercase; letter-spacing:0.04em;
}
.case-body{ padding:20px 22px 22px; }
.case-body .case-rating{ display:flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:var(--gold); margin-bottom:8px; }
.case-body h4{ font-size:16px; }
.case-body .zh{ font-size:12px; color:var(--slate-light); margin-top:2px; }
.case-body p{ font-size:13.5px; color:var(--slate); margin-top:10px; line-height:1.6; }
.case-stats{ display:flex; gap:16px; margin-top:16px; padding-top:14px; border-top:1px solid var(--line-soft); }
.case-stats div strong{ display:block; font-size:16px; color:var(--navy); font-weight:800; }
.case-stats div span{ font-size:11px; color:var(--slate); }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band{ padding:72px 0; }
.cta-band-inner{
  background:linear-gradient(135deg, #0F4C81, #082C4D);
  border-radius:14px; padding:56px 48px;
  display:flex; align-items:center; justify-content:space-between; gap:32px; flex-wrap:wrap;
  color:#fff; position:relative; overflow:hidden;
}
.cta-band-inner::after{
  content:""; position:absolute; right:-60px; top:-60px; width:240px; height:240px;
  border-radius:50%; border:1px solid rgba(255,255,255,0.12);
}
.cta-band-inner::before{
  content:""; position:absolute; right:20px; bottom:-90px; width:180px; height:180px;
  border-radius:50%; border:1px solid rgba(255,255,255,0.08);
}
.cta-text{ position:relative; z-index:1; max-width:520px; }
.cta-text h3{ font-size:clamp(22px,3vw,28px); }
.cta-text p{ margin-top:10px; color:#C7D9EA; font-size:14.5px; }
.cta-actions{ display:flex; gap:12px; flex-wrap:wrap; position:relative; z-index:1; }

/* ============================================================
   RESPONSIVE — homepage sections
   ============================================================ */
@media (max-width: 1080px){
  .hero .container{ grid-template-columns:1fr; }
  .dossier-wrap{ margin-top:8px; max-width:420px; margin-left:auto; margin-right:auto; }
  .feature-grid{ grid-template-columns:repeat(2,1fr); }
  .service-grid{ grid-template-columns:repeat(1,1fr); max-width:480px; margin:0 auto; }
  .partner-grid{ grid-template-columns:repeat(1,1fr); max-width:480px; margin:0 auto; }
  .case-grid{ grid-template-columns:repeat(1,1fr); max-width:480px; margin:0 auto; }
}
@media (max-width: 680px){
  .hero{ padding:44px 0 56px; }
  .hero-actions{ flex-direction:column; }
  .hero-actions .btn{ width:100%; }
  .hero-stats{ flex-wrap:wrap; gap:16px; }
  .hero-stat{ flex:1 1 40%; border-right:none; padding-right:0; }
  .feature-grid{ grid-template-columns:1fr; }
  .features,.services,.partners,.cases{ padding:56px 0; }
  .section-head{ margin-bottom:32px; }
  .cta-band-inner{ flex-direction:column; align-items:flex-start; padding:36px 26px; }
  .cta-actions{ width:100%; }
  .cta-actions .btn{ flex:1; }
  .dossier-float{ display:none; }
  .trust-strip .container{ flex-direction:column; align-items:flex-start; gap:14px; }
}

/* ============================================================
   SERVICES PAGE — detail rows (alternating copy/visual layout)
   ============================================================ */
.detail-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
  align-items:center;
  margin-bottom:80px;
  min-width:0;
}
.detail-row:last-child{ margin-bottom:0; }
.detail-row .detail-copy{ min-width:0; }
.detail-row .detail-visual{ min-width:0; display:flex; justify-content:center; }
.detail-row.is-reversed .detail-copy{ order:2; }
.detail-row.is-reversed .detail-visual{ order:1; }

.audit-mini-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
  min-width:0;
}

@media (max-width:900px){
  .detail-row,
  .detail-row.is-reversed{ grid-template-columns:1fr; gap:28px; }
  .detail-row.is-reversed .detail-copy{ order:1; }
  .detail-row.is-reversed .detail-visual{ order:2; }
  .detail-row{ margin-bottom:56px; }
}

/* ============================================================
   SERVICES PAGE — FAQ accordion
   ============================================================ */
.faq-list{ border-top:1px solid var(--line); }
.faq-item{
  border-bottom:1px solid var(--line);
  padding:20px 0;
}
.faq-item summary{
  cursor:pointer;
  font-weight:700;
  font-size:15.5px;
  color:var(--ink);
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{
  content:"+";
  flex-shrink:0;
  width:24px; height:24px;
  border-radius:50%;
  background:var(--bg-soft);
  color:var(--navy);
  display:flex; align-items:center; justify-content:center;
  font-size:16px;
  font-weight:400;
  transition:transform .2s ease;
}
.faq-item[open] summary::after{ content:"–"; }
.faq-item p{
  margin-top:14px;
  color:var(--slate);
  font-size:14px;
  line-height:1.7;
  max-width:680px;
}
.faq-item .zh{ display:inline; font-size:0.85em; margin-left:6px; }

/* ============================================================
   INDUSTRIES PAGE
   ============================================================ */
.industry-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:24px;
}
.industry-card{
  padding:30px 28px;
  min-width:0;
}
.industry-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}
.industry-card h3{ font-size:19px; }
.industry-card .zh{ margin-bottom:14px; }
.industry-summary{ font-size:14px; color:var(--slate); line-height:1.65; margin-top:4px; }
.industry-summary-zh{ font-size:13px; margin-top:6px; margin-bottom:0; }

.industry-risks{
  margin-top:20px;
  padding-top:18px;
  border-top:1px solid var(--line-soft);
}
.industry-risks-label{
  font-size:11.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:var(--slate-light);
  margin-bottom:10px;
}
.industry-risks ul{ display:flex; flex-direction:column; gap:8px; }
.industry-risks li{
  font-size:13px;
  color:var(--slate);
  padding-left:18px;
  position:relative;
  line-height:1.5;
}
.industry-risks li::before{
  content:"";
  position:absolute;
  left:0; top:7px;
  width:6px; height:6px;
  border-radius:50%;
  background:var(--gold);
}

.industry-cta{ margin-top:22px; }

.methodology-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
}
.methodology-grid .card{ min-width:0; }
.methodology-grid h4{ font-size:15px; margin-bottom:14px; line-height:1.4; }
.check-list li{
  font-size:13px;
  color:var(--slate);
  padding:8px 0 8px 20px;
  position:relative;
  border-bottom:1px solid var(--line-soft);
  line-height:1.5;
}
.check-list li:last-child{ border-bottom:none; padding-bottom:0; }
.check-list li:first-child{ padding-top:0; }
.check-list li::before{
  content:"✓";
  position:absolute;
  left:0; top:7px;
  color:var(--green);
  font-weight:700;
  font-size:12px;
}

@media (max-width:1080px){
  .industry-grid{ grid-template-columns:1fr; max-width:600px; margin:0 auto; }
  .methodology-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:680px){
  .methodology-grid{ grid-template-columns:1fr; }
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-stats-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
}
.about-stats-grid .card{ min-width:0; }
.stat-big{ display:block; font-size:30px; font-weight:800; color:var(--navy); letter-spacing:-0.01em; }
.stat-label{ display:block; font-size:12.5px; color:var(--slate); margin-top:8px; font-weight:600; }

.methodology-bars{ display:flex; flex-direction:column; gap:20px; }
.methodology-bar-row{ min-width:0; }
.methodology-bar-label{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  font-size:14px;
  font-weight:700;
  margin-bottom:8px;
  flex-wrap:wrap;
}
.methodology-bar-label .zh{ font-weight:500; font-size:0.85em; }
.bar-track{
  width:100%;
  height:10px;
  background:var(--bg-deep);
  border-radius:6px;
  overflow:hidden;
  position:relative;
}
.bar-fill{
  height:100%;
  background:linear-gradient(90deg, var(--navy), var(--navy-dark));
  border-radius:6px;
  position:relative;
  display:flex;
  align-items:center;
  font-size:0;
  color:transparent;
}

.legal-text p{
  color:var(--slate);
  line-height:1.8;
  font-size:14.5px;
  margin-bottom:16px;
}
.legal-text p:last-child{ margin-bottom:0; }
.legal-text p.zh{ font-size:13.5px; color:var(--slate-light); padding-top:6px; border-top:1px dashed var(--line); margin-top:20px; }

@media (max-width:1080px){
  .about-stats-grid{ grid-template-columns:repeat(2,1fr); }
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout{
  display:grid;
  grid-template-columns:1.6fr 1fr;
  gap:32px;
  align-items:start;
}
.contact-form-card{ min-width:0; }
.contact-sidebar{ min-width:0; }

.contact-sidebar-item{
  display:flex;
  gap:14px;
  padding:16px 0;
  border-bottom:1px solid var(--line-soft);
}
.contact-sidebar-item:last-child{ border-bottom:none; padding-bottom:0; }
.contact-sidebar-item:first-child{ padding-top:0; }
.contact-sidebar-icon{
  flex-shrink:0;
  width:38px; height:38px;
  border-radius:8px;
  background:var(--bg-soft);
  border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  color:var(--navy);
}
.contact-sidebar-icon svg{ width:18px; height:18px; }
.contact-sidebar-item > div{ min-width:0; flex:1; }
.contact-sidebar-item strong{ display:block; font-size:14px; }
.contact-sidebar-item > div > span:first-of-type{ display:block; font-size:11.5px; color:var(--slate-light); margin-top:1px; margin-bottom:6px; }
.contact-sidebar-item a{ color:var(--navy); font-weight:700; font-size:14px; word-break:break-word; }
.contact-sidebar-item a:hover{ text-decoration:underline; }

@media (max-width:980px){
  .contact-layout{ grid-template-columns:1fr; }
  .contact-sidebar{ order:2; }
  .contact-form-card{ order:1; }
}





/* ============================================================
   CARD GENERATOR — CTA strip + modal + card design
   ============================================================ */

/* ---- Floating CTA strip on homepage ---- */
.card-gen-strip{
  padding:48px 0;
  border-top:3px solid var(--gold);
  background:linear-gradient(180deg, #FFFDF5 0%, var(--bg) 100%);
}
.card-gen-strip-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
  flex-wrap:wrap;
}
.card-gen-strip-copy h3{ font-size:22px; font-weight:800; color:var(--ink); }
.card-gen-strip-copy p{ font-size:14.5px; color:var(--slate); margin-top:8px; max-width:560px; line-height:1.65; }
.card-gen-strip-copy .zh{ font-size:13px; margin-top:6px; color:var(--slate-light); }

.btn-card-gen{
  background:linear-gradient(135deg, var(--gold), #9a7a32);
  color:#fff;
  padding:15px 32px;
  font-size:16px;
  font-weight:800;
  border-radius:6px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
  box-shadow:0 4px 18px rgba(184,146,61,0.35);
  transition:transform .18s ease, box-shadow .18s ease;
  cursor:pointer;
  border:none;
  flex-shrink:0;
}
.btn-card-gen:hover{ transform:translateY(-2px); box-shadow:0 8px 28px rgba(184,146,61,0.45); }
.btn-card-gen svg{ width:20px; height:20px; }

/* ---- Modal overlay ---- */
.nv-modal-overlay{
  position:fixed; inset:0;
  background:rgba(8,20,33,0.65);
  z-index:500;
  display:flex; align-items:center; justify-content:center;
  padding:24px;
  opacity:0; pointer-events:none;
  transition:opacity .22s ease;
}
.nv-modal-overlay.open{ opacity:1; pointer-events:auto; }

.nv-modal{
  background:#fff;
  border-radius:14px;
  width:100%;
  max-width:700px;
  max-height:90vh;
  overflow-y:auto;
  box-shadow:0 24px 60px rgba(0,0,0,0.25);
  transform:translateY(16px) scale(0.98);
  transition:transform .25s ease;
}
.nv-modal-overlay.open .nv-modal{ transform:translateY(0) scale(1); }

.nv-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:22px 28px 0;
  border-bottom:1px solid var(--line);
  padding-bottom:18px;
}
.nv-modal-header h2{ font-size:19px; font-weight:800; color:var(--ink); }
.nv-modal-header .zh{ font-size:13px; font-weight:500; color:var(--slate-light); display:block; margin-top:2px; }
.nv-modal-close{
  width:34px; height:34px;
  border-radius:50%;
  background:var(--bg-soft);
  border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  color:var(--slate);
  font-size:20px;
  line-height:1;
  transition:background .15s ease;
  flex-shrink:0;
}
.nv-modal-close:hover{ background:var(--bg-deep); color:var(--ink); }

.nv-modal-body{ padding:24px 28px 28px; }

/* ---- Generator form ---- */
.nv-gen-note{
  background:rgba(184,146,61,0.07);
  border:1px solid rgba(184,146,61,0.25);
  border-radius:6px;
  padding:12px 15px;
  font-size:13px;
  color:var(--slate);
  line-height:1.6;
  margin-bottom:22px;
  display:flex;
  gap:10px;
}
.nv-gen-note svg{ flex-shrink:0; width:16px; height:16px; color:var(--gold); margin-top:1px; }

/* ---- Generated card UI ---- */
#nvCardResult{ display:none; }
.nv-card-actions{
  display:flex;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}
.nv-card-actions .btn{ flex:1; min-width:140px; }

/* ---- The actual card design ---- */
.nv-card{
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:0 6px 24px rgba(15,76,129,0.12);
  font-family:var(--font);
  background:#fff;
  min-width:0;
}
.nv-card-head{
  background:linear-gradient(135deg, #0F4C81 0%, #082C4D 100%);
  padding:22px 24px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  position:relative;
  overflow:hidden;
}
.nv-card-head::after{
  content:"";
  position:absolute; inset:0;
  background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 14px);
  pointer-events:none;
}
.nv-card-head-left{ flex:1; min-width:0; }
.nv-card-badge{
  font-size:9.5px;
  font-weight:700;
  letter-spacing:0.09em;
  text-transform:uppercase;
  color:rgba(255,255,255,0.75);
  display:block;
  margin-bottom:10px;
}
.nv-card-name{
  font-size:17px;
  font-weight:800;
  color:#fff;
  line-height:1.3;
  word-break:break-word;
}
.nv-card-name-zh{
  font-size:13px;
  color:rgba(255,255,255,0.75);
  margin-top:4px;
}
.nv-card-head-right{ text-align:right; flex-shrink:0; }
.nv-card-grade-label{ font-size:9px; color:rgba(255,255,255,0.6); text-transform:uppercase; letter-spacing:0.08em; }
.nv-card-grade{ font-size:13px; font-weight:800; color:var(--gold-light); margin-top:4px; line-height:1.3; }
.nv-card-grade span{ font-size:10px; font-weight:600; color:rgba(255,255,255,0.7); }

.nv-card-body{
  padding:20px 24px;
  display:flex;
  gap:18px;
  align-items:flex-start;
}
.nv-card-qr{
  flex-shrink:0;
  width:112px;
}
.nv-card-qr svg{ width:100%; height:auto; border:1px solid var(--line); border-radius:6px; padding:6px; }
.nv-card-qr p{
  font-size:10px;
  color:var(--slate-light);
  text-align:center;
  margin-top:6px;
}
.nv-card-info{ flex:1; min-width:0; }
.nv-card-code{
  font-family:var(--mono);
  font-size:11.5px;
  font-weight:700;
  color:var(--navy);
  letter-spacing:0.03em;
  background:var(--bg-soft);
  border:1px solid var(--line);
  border-radius:4px;
  padding:6px 10px;
  margin-bottom:12px;
  word-break:break-all;
}
.nv-card-row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:8px;
  padding:5px 0;
  border-bottom:1px dashed var(--line-soft);
  font-size:12.5px;
}
.nv-card-row:last-of-type{ border-bottom:none; }
.nv-card-row span{ color:var(--slate); flex-shrink:0; }
.nv-card-row strong{ color:var(--ink); text-align:right; word-break:break-word; }

.nv-card-status{
  display:flex;
  align-items:flex-start;
  gap:6px;
  font-size:10.5px;
  color:var(--gold);
  background:rgba(184,146,61,0.08);
  border:1px solid rgba(184,146,61,0.2);
  border-radius:4px;
  padding:7px 10px;
  margin-top:10px;
  line-height:1.5;
}
.nv-card-status svg{ flex-shrink:0; margin-top:1px; }

.nv-card-foot{
  background:var(--navy-deeper);
  color:rgba(255,255,255,0.65);
  font-size:10px;
  padding:10px 24px;
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:4px;
}

/* Print styles for card download fallback */
@media print{
  body > *:not(.nv-modal-overlay){ display:none !important; }
  .nv-modal-overlay{ position:static; display:block !important; opacity:1; padding:0; background:none; }
  .nv-modal{ box-shadow:none; max-height:none; }
  .nv-modal-header, .nv-gen-note, .nv-card-actions, #nvCardForm, .nv-modal-close{ display:none !important; }
}

@media (max-width:680px){
  .card-gen-strip-inner{ flex-direction:column; align-items:flex-start; }
  .btn-card-gen{ width:100%; justify-content:center; }
  .nv-modal-overlay{ padding:12px; }
  .nv-modal-header{ padding:16px 18px 14px; }
  .nv-modal-body{ padding:16px 18px 20px; }
  .nv-card-body{ flex-direction:column; gap:14px; }
  .nv-card-qr{ width:100%; max-width:140px; }
  .nv-card-row{ flex-direction:column; gap:2px; }
  .nv-card-row strong{ text-align:left; }
  .nv-card-foot{ flex-direction:column; }
  .nv-card-actions .btn{ flex:none; width:100%; }
}
