/* DeliverShield V3.7.2 – Studio polish layer
   UI/UX only. Keeps V3.6/V3.7 business logic unchanged. */
:root{
  --v372-cyan:#22c7f7;
  --v372-cyan-2:#1597ff;
  --v372-panel:#071b31;
  --v372-panel-soft:#0a223a;
  --v372-line:#17486f;
  --v372-muted:#8da8c2;
  --v372-text:#f5f9ff;
  --v372-green:#43ddb1;
}

/* ---------- desktop composition ---------- */
.studio-v37 .studio-shell-v37{
  grid-template-columns:minmax(430px,460px) minmax(0,1fr);
  height:calc(100vh - 68px);
  min-height:650px;
}
.studio-v37 .v37-controls{
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#174c78 transparent;
  box-shadow:18px 0 60px rgba(0,0,0,.08);
}
.studio-v37[dir="rtl"] .v37-controls{box-shadow:-18px 0 60px rgba(0,0,0,.08)}
.studio-v37 .wizard-form{flex:0 0 auto;min-height:0}
.studio-v37 .wizard-body{flex:0 0 auto;min-height:0;overflow:visible;padding-bottom:8px}
.studio-v37 .wizard-panel.active{display:flex;flex-direction:column;gap:0;min-height:0}

/* remove the giant empty gap before actions */
.studio-v37 .studio-actionbar{
  position:sticky;
  bottom:0;
  z-index:24;
  margin-top:16px;
  padding:12px 22px calc(12px + env(safe-area-inset-bottom));
  background:linear-gradient(180deg,rgba(5,22,40,.86),rgba(4,18,34,.98));
  border-top:1px solid rgba(71,154,217,.28);
  box-shadow:0 -16px 38px rgba(0,0,0,.22);
}
.studio-v37 .studio-actionbar .btn{
  min-height:44px;
  border-radius:11px;
  font-size:12px;
  font-weight:800;
}
.studio-v37 .studio-actionbar #backStep{min-width:92px}
.studio-v37 .actionbar-right .btn{min-width:146px}

/* ---------- intro / stepper ---------- */
.studio-v37 .v37-intro{padding:26px 28px 15px}
.studio-v37 .v37-intro h1{font-size:30px;letter-spacing:-.025em;margin-top:8px}
.studio-v37 .v37-intro p{font-size:12px;max-width:355px}
.studio-v37 .wizard-steps{padding:0 24px 17px;gap:7px}
.studio-v37 .wizard-steps button{
  height:50px;
  border-radius:12px;
  border-color:#174568;
  background:#071a2f;
}
.studio-v37 .wizard-steps button i{width:21px;height:21px;font-size:10px}
.studio-v37 .wizard-steps button span{font-size:10px}
.studio-v37 .wizard-steps button.active{
  border-color:#20bdf3;
  background:linear-gradient(180deg,rgba(22,139,222,.28),rgba(8,43,73,.65));
  box-shadow:0 0 0 1px rgba(34,199,247,.08),0 10px 24px rgba(0,0,0,.16);
}
.studio-v37 .wizard-steps button.done{border-color:#17605f;background:#082a35;color:#c7f5e7}

/* ---------- current step content ---------- */
.studio-v37 .wizard-body{padding-inline:24px}
.studio-v37 .panel-heading{padding:8px 0 17px;grid-template-columns:40px 1fr;gap:13px}
.studio-v37 .panel-heading .step-kicker{width:36px;height:36px;border-radius:11px}
.studio-v37 .panel-heading h2{font-size:19px;line-height:1.25;margin-bottom:5px}
.studio-v37 .panel-heading p{font-size:11px;line-height:1.55;max-width:330px}

/* ---------- upload ---------- */
.studio-v37 .v37-upload{
  min-height:164px;
  border-radius:16px;
  border-color:#1a8fcf;
  background:
    radial-gradient(circle at 50% 0%,rgba(24,189,244,.10),transparent 42%),
    linear-gradient(145deg,rgba(10,52,87,.66),rgba(5,25,45,.84));
}
.studio-v37 .v37-upload .upload-icon{width:50px;height:50px}
.studio-v37 .v37-upload strong{font-size:14px}
.studio-v37 .v37-upload small{font-size:10px}
.studio-v37 .v37-grid{gap:10px;margin-top:12px}
.studio-v37 .field>label{font-size:10px;margin-bottom:7px}
.studio-v37 input[type="text"],
.studio-v37 input[type="password"],
.studio-v37 input[type="number"],
.studio-v37 select{
  min-height:46px;
  font-size:12px;
  border-radius:11px;
}

/* ---------- smart watermark ---------- */
.studio-v37 .v37-watermark-card .field-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}
.studio-v37 .smart-badge{
  background:rgba(8,82,82,.42);
  border-color:#168b8b;
  color:#78f1d5;
  font-size:8px;
  font-weight:900;
  letter-spacing:.04em;
  white-space:nowrap;
}
.studio-v37 .metric-ranges{gap:10px;margin-top:13px}
.studio-v37 .metric-ranges label,
.studio-v37 .v37-wm-grid>label{
  min-height:66px;
  padding:11px 12px;
  border-color:#174667;
  background:linear-gradient(180deg,#082039,#071a2e);
}
.studio-v37 .metric-ranges label>span{font-size:10px;margin-bottom:10px}
.studio-v37 input[type="range"]{height:18px;cursor:pointer}

/* Fix V3.6 style collision that made Smart Center a cyan text pile */
.studio-v37 .v37-mode-row{gap:10px;margin-top:12px}
.studio-v37 .v37-mode-row .mode-pill{
  position:relative;
  min-height:82px!important;
  padding:13px 12px 12px 42px!important;
  display:block!important;
  overflow:hidden;
  border:1px solid #17476b!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#082038,#07192d)!important;
  color:var(--v372-text)!important;
  box-shadow:none!important;
}
.studio-v37[dir="rtl"] .v37-mode-row .mode-pill{padding:13px 42px 12px 12px!important}
.studio-v37 .v37-mode-row .mode-pill input[type="radio"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.studio-v37 .v37-mode-row .mode-pill::before{
  content:"";
  position:absolute;
  left:13px;
  top:17px;
  width:16px;
  height:16px;
  border:2px solid #3d6e93;
  border-radius:50%;
  background:#06172a;
  box-shadow:inset 0 0 0 4px #06172a;
}
.studio-v37[dir="rtl"] .v37-mode-row .mode-pill::before{left:auto;right:13px}
.studio-v37 .v37-mode-row .mode-pill.selected{
  border-color:#26c7f5!important;
  background:linear-gradient(145deg,rgba(13,74,112,.72),rgba(7,28,49,.96))!important;
  color:#fff!important;
  box-shadow:0 0 0 1px rgba(38,199,245,.10),0 12px 28px rgba(0,0,0,.14)!important;
}
.studio-v37 .v37-mode-row .mode-pill.selected::before{
  border-color:#22c7f7;
  background:#22c7f7;
  box-shadow:inset 0 0 0 4px #082038,0 0 0 3px rgba(34,199,247,.08);
}
.studio-v37 .v37-mode-row .mode-pill span{display:block!important;min-width:0}
.studio-v37 .v37-mode-row .mode-pill b{display:block!important;font-size:12px!important;line-height:1.25!important;color:#f5f9ff!important;margin:0!important}
.studio-v37 .v37-mode-row .mode-pill small{display:block!important;font-size:9px!important;line-height:1.45!important;color:#819bb4!important;margin:5px 0 0!important;white-space:normal!important}
.studio-v37 .v37-mode-row .mode-pill.selected small{color:#a8c7d9!important}
.studio-v37 .v37-mode-row .mode-pill>em{top:9px;right:9px;font-size:8px;padding:4px 6px}
.studio-v37[dir="rtl"] .v37-mode-row .mode-pill>em{left:9px;right:auto}

.studio-v37 .pro-watermark-controls{padding:13px;margin-top:11px;background:#06192d}
.studio-v37 .pro-lock-note{font-size:10px}
.studio-v37 .info-strip{padding:13px 14px;border-radius:13px;margin-top:12px}
.studio-v37 .info-strip b{font-size:11px}
.studio-v37 .info-strip small{font-size:9px}

/* ---------- signature ---------- */
.studio-v37 .v37-sign-card{
  min-height:104px;
  padding:17px;
  border-radius:15px;
  background:
    radial-gradient(circle at 100% 0%,rgba(30,161,239,.09),transparent 42%),
    linear-gradient(160deg,#082038,#06182b);
}
.studio-v37[dir="rtl"] .v37-sign-card{background:radial-gradient(circle at 0 0,rgba(30,161,239,.09),transparent 42%),linear-gradient(160deg,#082038,#06182b)}
.studio-v37 .signature-config-head{min-height:64px;align-items:center}
.studio-v37 .signature-config-head b{font-size:13px;line-height:1.3}
.studio-v37 .signature-config-head small{font-size:10px;line-height:1.55;max-width:285px;margin-top:4px;color:#819cb6}
.studio-v37 .signature-controls{padding-top:13px;margin-top:11px;border-top:1px solid rgba(58,132,188,.20)}
.studio-v37 .signature-placement-hint{margin-top:11px;padding:12px;border-radius:12px;background:#08223b;border:1px dashed #1d79af}
.studio-v37 .v37-sign-card:has(#signatureRequired:checked){border-color:#1686bd;box-shadow:0 0 0 1px rgba(34,199,247,.05)}

/* ---------- access ---------- */
.studio-v37 .access-card-list{gap:10px}
.studio-v37 .v37-toggle-card{
  min-height:88px;
  padding:14px 15px;
  border-radius:14px;
  background:linear-gradient(180deg,#082039,#071b30);
}
.studio-v37 .toggle-icon{width:38px;height:38px;border-radius:10px;font-size:15px}
.studio-v37 .v37-toggle-card b{font-size:12px;line-height:1.3}
.studio-v37 .v37-toggle-card small{font-size:9px;line-height:1.5;margin-top:4px;max-width:260px}

/* slightly larger, easier switches */
.studio-v37 .switch{transform:scale(1.07);transform-origin:center}

/* ---------- share / plans ---------- */
.studio-v37 .selected-plan-card{
  min-height:70px;
  padding:14px 15px;
  border-radius:14px;
  margin-bottom:12px;
  background:linear-gradient(145deg,rgba(10,103,163,.30),rgba(6,28,49,.86));
}
.studio-v37 .selected-plan-card b{font-size:14px}
.studio-v37 .selected-plan-card strong{font-size:22px}
.studio-v37 .v37-plan-picker{padding:13px;border-radius:14px}
.studio-v37 .v37-plan-picker .picker-head b{font-size:12px}
.studio-v37 .v37-plan-picker .plan-tabs button{height:34px}
.studio-v37 #onePlans{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.studio-v37 #onePlans .plan-opt:last-child{grid-column:1/-1}
.studio-v37 #subPlans{grid-template-columns:1fr;gap:8px}
.studio-v37 .v37-plan-options .plan-opt{
  min-height:55px;
  padding:9px 10px;
  border-radius:11px;
  background:#071a2e;
}
.studio-v37 .v37-plan-options .plan-opt b{font-size:11px}
.studio-v37 .v37-plan-options .plan-opt small{font-size:8px}
.studio-v37 .v37-plan-options .plan-opt em{font-size:12px}
.studio-v37 .v37-plan-options .plan-opt.selected{border-color:#25bdf3;background:linear-gradient(145deg,rgba(13,99,158,.31),rgba(6,29,50,.84))}
.studio-v37 .share-ready-card{padding:12px 13px;margin-top:12px}

/* ---------- preview ---------- */
.studio-v37 .v37-preview-stage{
  padding:26px 28px 30px;
  background:
    radial-gradient(circle at 80% 16%,rgba(20,119,226,.15),transparent 34%),
    radial-gradient(circle at 28% 80%,rgba(18,82,156,.06),transparent 28%),
    linear-gradient(180deg,#041426,#031123);
}
.studio-v37 .v37-preview-top{margin-bottom:12px}
.studio-v37 .v37-preview-top h2{font-size:22px}
.studio-v37 .preview-toolbar{height:42px;padding-inline:13px}
.studio-v37 .v37-browser-mock{box-shadow:0 26px 78px rgba(0,0,0,.30),0 0 0 1px rgba(33,147,214,.05)}
.studio-v37 .v37-browser-mock .preview-canvas{height:clamp(460px,66vh,780px)}
.studio-v37 .preview-summary-row{gap:10px;margin-top:12px}
.studio-v37 .preview-summary-row>div{min-height:55px;padding:11px 12px}
.studio-v37 .preview-summary-row b{font-size:10px}
.studio-v37 .preview-summary-row small{font-size:8px}

/* ---------- mobile preview drawer ---------- */
.mobile-preview-toggle,.mobile-preview-close{display:none}

@media(max-width:1180px){
  .studio-v37 .studio-shell-v37{grid-template-columns:minmax(400px,430px) minmax(0,1fr)}
  .studio-v37 .v37-browser-mock .preview-canvas{height:60vh}
}

@media(max-width:900px){
  .studio-v37 .studio-shell-v37{display:block;height:auto;min-height:calc(100vh - 60px)}
  .studio-v37 .v37-controls{overflow:visible;box-shadow:none}
  .studio-v37 .wizard-form{display:block}
  .studio-v37 .wizard-body{padding:0 15px 8px}
  .studio-v37 .v37-intro{padding:20px 16px 12px}
  .studio-v37 .v37-intro h1{font-size:25px}
  .studio-v37 .wizard-steps{padding:0 12px 13px}
  .studio-v37 .studio-actionbar{
    position:sticky;
    bottom:0;
    margin-top:14px;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom));
    z-index:60;
  }
  .studio-v37 .studio-actionbar #backStep{min-width:76px}
  .studio-v37 .actionbar-right{flex:1}
  .studio-v37 .actionbar-right .btn{width:100%;min-width:0}
  .studio-v37 .mobile-preview-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-width:94px;
    min-height:42px;
    border:1px solid #1b608f;
    background:#08233d;
    color:#b8e8fb;
    border-radius:10px;
    font-size:10px;
    font-weight:800;
  }
  .studio-v37 .mobile-preview-toggle span{font-size:14px;color:#58d6ff}
  .studio-v37 .mobile-preview-toggle b{font-size:10px}

  /* preview becomes an on-demand bottom sheet instead of pushing the wizard down */
  .studio-v37 .v37-preview-stage{
    display:block;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:80;
    height:min(78vh,760px);
    padding:48px 12px calc(14px + env(safe-area-inset-bottom));
    overflow:auto;
    transform:translateY(105%);
    opacity:0;
    pointer-events:none;
    transition:transform .24s ease,opacity .2s ease;
    border-top:1px solid #1d72a7;
    box-shadow:0 -24px 80px rgba(0,0,0,.48);
  }
  .studio-v37.mobile-preview-open .v37-preview-stage{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
  }
  .studio-v37.mobile-preview-open{overflow:hidden}
  .studio-v37 .mobile-preview-close{
    display:grid;
    place-items:center;
    position:absolute;
    top:10px;
    right:12px;
    width:34px;
    height:34px;
    border-radius:10px;
    border:1px solid #1a5b87;
    background:#071b31;
    color:#d7f4ff;
    font-size:18px;
    z-index:3;
  }
  .studio-v37[dir="rtl"] .mobile-preview-close{right:auto;left:12px}
  .studio-v37 .v37-preview-top{align-items:center}
  .studio-v37 .v37-preview-top h2{font-size:18px;max-width:58vw}
  .studio-v37 .v37-browser-mock .preview-canvas{height:min(56vh,520px);min-height:320px}
  .studio-v37 .preview-summary-row{grid-template-columns:1fr 1fr 1fr}
  .studio-v37 .preview-summary-row>div{min-height:48px;padding:8px}
  .studio-v37 .preview-summary-row small{display:none}

  .studio-v37 .v37-grid,
  .studio-v37 .metric-ranges,
  .studio-v37 .v37-mode-row,
  .studio-v37 .v37-wm-grid{grid-template-columns:1fr}
  .studio-v37 #onePlans{grid-template-columns:1fr}
  .studio-v37 #onePlans .plan-opt:last-child{grid-column:auto}
  .studio-v37 .v37-mode-row .mode-pill{min-height:76px!important}
}

@media(max-width:560px){
  .studio-v37 .v37-intro h1{font-size:24px}
  .studio-v37 .wizard-steps{gap:5px;grid-template-columns:repeat(5,minmax(60px,1fr))}
  .studio-v37 .wizard-steps button{height:45px;padding:4px 3px}
  .studio-v37 .wizard-steps button span{font-size:8.5px}
  .studio-v37 .panel-heading h2{font-size:17px}
  .studio-v37 .panel-heading p{font-size:10px}
  .studio-v37 .v37-upload{min-height:145px}
  .studio-v37 .studio-actionbar{gap:7px}
  .studio-v37 .mobile-preview-toggle{min-width:48px;width:48px;padding:0}
  .studio-v37 .mobile-preview-toggle b{display:none}
  .studio-v37 .actionbar-right .btn{font-size:11px}
  .studio-v37 .preview-summary-row{grid-template-columns:1fr}
  .studio-v37 .preview-summary-row small{display:block}
}
