/* /pdf/css/style.css */
:root{
  --bg1:#f7f9fb;
  --bg2:#ffffff;
  --card:#ffffff;
  --text:#1f2937;
  --text-dark:#111827;
  --muted:#6b7280;
  --muted-light:#9ca3af;
  --line:rgba(229,231,235,.6);
  --shadow:0 8px 24px rgba(15,23,42,.06);
  --shadow-lg:0 12px 32px rgba(15,23,42,.08);
  --brand:#2563eb;
  --brand-hover:#1d4ed8;
  --radius:16px;
  --border:#e5e7eb;
  --pill:#f8fafc;
  --success:#10b981;
  --icon-bg:#f0f9ff;
}

*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--text);
  background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
  min-height:100vh;
}

/* ========== TOP NAVIGATION ========== */
.topnav{
  position: sticky; 
  top:0; 
  z-index:1000;
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229,231,235,.8);
  box-shadow: 0 2px 12px rgba(15,23,42,.04);
}

.topnav-inner{
  max-width: 1100px; 
  margin:0 auto; 
  padding:14px 18px;
  display:flex; 
  align-items:center; 
  justify-content:center;
  gap:14px;
  position:relative;
}

.brand{ 
  position:absolute;
  left:18px;
  font-weight:800; 
  letter-spacing:-.02em;
  font-size:18px;
  color:var(--brand);
}

.menu{ 
  display:flex; 
  gap:10px; 
  align-items:center; 
}

.dropdown{ 
  position:relative; 
}

.dd-btn{
  border:1px solid var(--border);
  background: var(--pill);
  padding:10px 14px;
  border-radius: 999px;
  font-weight:600;
  cursor:pointer;
  display:flex; 
  align-items:center; 
  gap:8px;
  font-size:14px;
  color:var(--text);
  transition: all 0.2s ease;
}

.dd-btn:hover{ 
  box-shadow: 0 6px 16px rgba(15,23,42,.08);
  background:#fff;
}

.dd-btn .chev{
  font-size:10px;
  transition: transform 0.2s ease;
}

.dropdown.open .dd-btn{ 
  background:#fff;
  box-shadow: 0 6px 16px rgba(15,23,42,.1);
}

.dropdown.open .dd-btn .chev{
  transform: rotate(180deg);
}

.dd-panel{
  position:absolute; 
  top:52px; 
  left:50%;
  transform:translateX(-50%);
  background:#fff; 
  border:1px solid var(--border);
  border-radius:14px; 
  box-shadow: var(--shadow);
  padding:14px; 
  min-width: 520px;
  display:none;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.dd-panel-narrow{ 
  min-width: 260px; 
}

.dropdown.open .dd-panel{ 
  display:block; 
}

.dd-cols{ 
  display:grid; 
  grid-template-columns: repeat(2, minmax(180px, 1fr)); 
  gap:14px; 
}

.dd-col-title{ 
  font-size:11px; 
  color:var(--muted); 
  font-weight:700; 
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin:2px 0 10px; 
}

.dd-item{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  padding:10px 10px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
  color:#111827;
  font-size:14px;
  transition: all 0.15s ease;
}

.dd-item:hover{ 
  background:#f3f4f6;
  transform: translateX(2px);
}

/* ========== MAIN PAGE ========== */
.page{
  max-width:1100px;
  margin:0 auto;
  padding:32px 18px 60px
}

.hero{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:16px;
  padding-top:24px;
}

h1{
  font-size:42px;
  line-height:1.1;
  letter-spacing:-0.5px;
  max-width:900px;
  font-weight:800;
  color:var(--text-dark);
}

.sub{
  color:var(--muted);
  font-size:16px;
  max-width:720px;
  display:none;
}

.uploader{
  width:min(900px, 100%);
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  border:2px dashed var(--line);
  margin-top:24px;
  cursor:pointer;
  transition: all 0.25s ease;
}

.uploader:hover{
  border-color:#93c5fd;
  box-shadow:var(--shadow-lg);
}

.uploader-inner{
  padding:32px 24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

.icon{
  width:56px;
  height:56px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--icon-bg);
  color:#60a5fa;
  margin-bottom:4px;
}

.droptext{
  font-weight:600;
  color:var(--text);
  font-size:15px;
}

.limit{
  font-size:13px;
  color:var(--muted-light);
  margin-top:4px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 20px;
  border-radius:10px;
  background:var(--brand);
  color:white;
  font-weight:600;
  font-size:15px;
  cursor:pointer;
  user-select:none;
  box-shadow:0 4px 12px rgba(37,99,235,.2);
  transition: all 0.2s ease;
  border:none;
  margin-top:4px;
}

.btn:hover{
  background:var(--brand-hover);
  box-shadow:0 6px 16px rgba(37,99,235,.3);
  transform: translateY(-1px);
}

.btn input{
  display:none
}

.rating{
  margin-top:20px;
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  color:var(--text);
  font-size:14px;
}

.badge{
  font-weight:700;
  color:var(--text-dark);
}

.stars{
  letter-spacing:2px;
  color:#fbbf24;
  font-size:16px;
}

.meta{
  color:var(--text-dark);
  font-size:14px;
  font-weight:500;
}

.meta strong{
  font-weight:700;
}

.stats{
  width:min(900px,100%);
  margin-top:48px;
}

.stats-title{
  color:var(--muted);
  font-size:14px;
  font-weight:500;
  margin-bottom:28px;
  text-align:center;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:32px;
  align-items:center;
}

.stat{
  background:transparent;
  border:none;
  padding:0;
  box-shadow:none;
  display:flex;
  align-items:center;
  gap:16px;
  justify-content:center;
}

.stat-icon{
  width:56px;
  height:56px;
  min-width:56px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}

.stat-icon svg{
  width:26px;
  height:26px;
  fill:currentColor;
}

.stat:nth-child(1) .stat-icon{
  background:#e8f5e9;
  color:#2e7d32;
}

.stat:nth-child(2) .stat-icon{
  background:#fff9e6;
  color:#f57c00;
}

.stat:nth-child(3) .stat-icon{
  background:#e3f2fd;
  color:#1976d2;
}

.stat-content{
  flex:0;
  text-align:left;
}

.stat-num{
  font-size:28px;
  font-weight:800;
  color:var(--text-dark);
  line-height:1.2;
  margin-bottom:2px;
}

.stat-label{
  font-size:14px;
  color:var(--muted);
  font-weight:400;
  white-space:nowrap;
}

.steps{
  width:min(1100px,100%);
  margin-top:80px;
}

.steps h2{
  font-size:40px;
  letter-spacing:-.8px;
  font-weight:800;
  text-align:center;
  margin-bottom:48px;
  color:var(--text-dark);
}

.step-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:40px;
}

.step{
  background:transparent;
  border:none;
  padding:0;
  text-align:left;
}

.step-wrapper{
  background:#f0fdf4;
  border-radius:20px;
  padding:36px 28px;
  margin-bottom:24px;
  min-height:300px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.step:nth-child(2) .step-wrapper{
  background:#fffbeb;
}

.step:nth-child(3) .step-wrapper{
  background:#eff6ff;
}

.step-image-container{
  width:100%;
  background:white;
  border-radius:14px;
  border:2px dashed #d1d5db;
  padding:24px 20px;
  box-shadow:0 4px 20px rgba(15,23,42,.06);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-height:220px;
}

.step-image{
  width:100%;
  height:auto;
  max-height:180px;
  object-fit:contain;
}

.step-image-placeholder{
  font-size:72px;
  opacity:0.3;
  line-height:1;
}

.step-image-text{
  font-size:13px;
  color:var(--muted);
  font-weight:500;
  text-align:center;
}

.step-t{
  font-weight:700;
  font-size:18px;
  color:var(--text-dark);
  margin-bottom:10px;
}

.step-d{
  color:var(--muted);
  font-size:15px;
  line-height:1.6;
}

.legal{
  margin-top:24px;
  color:var(--muted-light);
  font-size:12px;
  max-width:900px;
  text-align:center;
}

/* ========== OVERLAY PROCESSING ========== */
.overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
  padding:18px;
  z-index:9999;
}

.overlay.show{
  display:flex
}

.overlay-card{
  width:min(480px,100%);
  background:white;
  border-radius:16px;
  padding:32px 24px;
  box-shadow:0 20px 50px rgba(0,0,0,.3);
  text-align:center;
}

.spinner{
  width:40px;
  height:40px;
  border-radius:50%;
  border:4px solid rgba(37,99,235,.15);
  border-top-color:var(--brand);
  margin:0 auto 16px;
  animation:spin .8s linear infinite;
}

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

.overlay-t{
  font-weight:700;
  font-size:16px;
  color:var(--text-dark);
  margin-bottom:16px;
}

.bar{
  height:8px;
  border-radius:999px;
  background:#e5e7eb;
  overflow:hidden;
}

.bar-fill{
  height:100%;
  width:0%;
  background:var(--brand);
  transition:width .12s linear;
}

.pct{
  margin-top:12px;
  color:var(--muted);
  font-weight:700;
  font-size:14px;
}

/* ========== PDF PREVIEW MODAL ========== */
.preview-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  padding:20px;
  z-index:10000;
}

.preview-modal.show{
  display:flex;
}

.preview-content{
  width:min(900px, 100%);
  max-height:90vh;
  background:white;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 25px 70px rgba(0,0,0,.4);
  display:flex;
  flex-direction:column;
}

.preview-header{
  padding:20px 24px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.preview-title{
  font-weight:700;
  font-size:18px;
  color:var(--text-dark);
}

.preview-close{
  width:32px;
  height:32px;
  border-radius:8px;
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:24px;
  color:var(--muted);
  transition:all 0.2s ease;
  display:flex;
  align-items:center;
  justify-content:center;
}

.preview-close:hover{
  background:#f3f4f6;
  color:var(--text);
}

.preview-body{
  flex:1;
  overflow-y:auto;
  padding:24px;
  position:relative;
}

.preview-pages{
  display:flex;
  flex-direction:column;
  gap:20px;
  align-items:center;
}

.preview-page{
  width:100%;
  max-width:600px;
  background:#f9fafb;
  border:1px solid var(--border);
  border-radius:12px;
  padding:20px;
  position:relative;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
  display:flex;
  flex-direction:column;
  align-items:center;
}

.preview-page-number{
  position:absolute;
  top:12px;
  right:12px;
  background:rgba(0,0,0,.6);
  color:white;
  padding:4px 10px;
  border-radius:6px;
  font-size:12px;
  font-weight:600;
  z-index:5;
}

.preview-page-canvas{
  width:100%;
  height:auto;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
  background:white;
}

.preview-page-loading{
  width:100%;
  min-height:800px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-size:14px;
}

.preview-blur{
  position:relative;
}

.preview-blur::after{
  content:'';
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  height:60%;
  background:linear-gradient(to bottom, transparent, rgba(249,250,251,0.95));
  backdrop-filter:blur(8px);
}

.preview-warning{
  position:absolute;
  bottom:32px;
  left:50%;
  transform:translateX(-50%);
  background:white;
  border:2px solid #fbbf24;
  border-radius:12px;
  padding:20px 24px;
  box-shadow:0 8px 24px rgba(0,0,0,.15);
  max-width:90%;
  z-index:10;
}

.preview-warning-icon{
  width:48px;
  height:48px;
  margin:0 auto 12px;
  background:#fef3c7;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
}

.preview-warning-title{
  font-weight:700;
  font-size:16px;
  color:var(--text-dark);
  margin-bottom:8px;
  text-align:center;
}

.preview-warning-text{
  font-size:14px;
  color:var(--muted);
  text-align:center;
  margin-bottom:16px;
  line-height:1.5;
}

.preview-warning-btn{
  width:100%;
  padding:12px 20px;
  background:#fbbf24;
  color:#78350f;
  border:none;
  border-radius:10px;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  transition:all 0.2s ease;
}

.preview-warning-btn:hover{
  background:#f59e0b;
  transform:translateY(-1px);
}

.preview-footer{
  padding:20px 24px;
  border-top:1px solid var(--border);
  display:flex;
  gap:12px;
  justify-content:flex-end;
}

.preview-btn{
  padding:12px 24px;
  border-radius:10px;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  transition:all 0.2s ease;
  border:none;
}

.preview-btn-secondary{
  background:#f3f4f6;
  color:var(--text);
}

.preview-btn-secondary:hover{
  background:#e5e7eb;
}

.preview-btn-primary{
  background:var(--brand);
  color:white;
}

.preview-btn-primary:hover{
  background:var(--brand-hover);
  transform:translateY(-1px);
}

/* ========== MOBILE ========== */
.desktop-only{display:block}
.mobile-only{display:none}

.mobile-menu-toggle{
  display:none;
  position:absolute;
  right:18px;
  background:transparent;
  border:none;
  padding:8px;
  cursor:pointer;
  font-size:24px;
  color:var(--text);
}

@media (max-width: 820px){
  .topnav-inner{
    padding:12px 18px;
    justify-content:center;
  }

  .brand{
    position:static;
    margin-right:auto;
  }

  .mobile-menu-toggle{
    display:block;
  }

  .menu{
    position:fixed;
    top:58px;
    left:0;
    right:0;
    background:rgba(255,255,255,.98);
    backdrop-filter:blur(12px);
    border-top:1px solid var(--border);
    border-bottom:1px solid var(--border);
    flex-direction:column;
    gap:0;
    padding:12px 0;
    box-shadow:0 8px 24px rgba(15,23,42,.12);
    display:none;
  }

  .menu.open{
    display:flex;
  }

  .dropdown{
    width:100%;
  }

  .dd-btn{
    width:calc(100% - 32px);
    margin:4px 16px;
    justify-content:space-between;
  }

  .dd-panel{
    position:static;
    transform:none;
    min-width:auto;
    width:calc(100% - 32px);
    margin:0 16px 8px;
    box-shadow:0 4px 12px rgba(15,23,42,.08);
  }

  .dropdown.open .dd-panel{
    animation:none;
  }

  .dd-cols{ 
    grid-template-columns: 1fr; 
  }

  h1{
    font-size:34px
  }

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

  .step-grid{
    grid-template-columns:1fr;
    gap:32px;
  }

  .rating{
    flex-wrap:wrap
  }

  .step-wrapper{
    min-height:260px;
  }

  .steps h2{
    font-size:32px;
  }

  .step-image-container{
    min-height:200px;
  }
}

@media (max-width: 480px){
  .page{
    padding:20px 14px 52px
  }

  .brand{
    font-size:16px;
  }

  .dd-btn{
    padding:10px 12px;
    font-size:13px;
  }

  .dd-btn .chev{
    font-size:9px;
  }

  h1{
    font-size:28px
  }

  .steps h2{
    font-size:26px;
  }

  .desktop-only{
    display:none
  }

  .mobile-only{
    display:block
  }

  .uploader-inner{
    padding:24px 16px
  }

  .step-wrapper{
    min-height:220px;
    padding:28px 20px;
  }

  .step-image-placeholder{
    font-size:56px;
  }

  .stat-icon{
    width:52px;
    height:52px;
    min-width:52px;
  }

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

  .stat-num{
    font-size:26px;
  }

  .stat-label{
    font-size:13px;
  }

  .step-t{
    font-size:17px;
  }

  .step-d{
    font-size:14px;
  }

  .step-grid{
    gap:28px;
  }

  .preview-content{
    max-height:85vh;
  }

  .preview-header{
    padding:16px 20px;
  }

  .preview-title{
    font-size:16px;
  }

  .preview-body{
    padding:20px 16px;
  }

  .preview-page{
    padding:32px 24px;
    min-height:700px;
  }

  .preview-page-canvas{
    max-width:100%;
  }

  .preview-warning{
    bottom:24px;
    padding:16px 20px;
  }

  .preview-warning-icon{
    width:42px;
    height:42px;
    font-size:22px;
  }

  .preview-footer{
    padding:16px 20px;
    flex-direction:column;
  }

  .preview-btn{
    width:100%;
  }
}