*{
  box-sizing:border-box;
}

:root{
  --yellow:#ffd200;
  --yellow-2:#ffe36c;
  --brand-gray:#585655;
  --brand-gray-2:#6d6a69;
  --text:#585655;
  --muted:#7b7877;
  --line:#d9dddf;
  --bg:#eef1f3;
  --white:#ffffff;
  --danger:#d9382b;
  --ok:#18834f;
}

body{
  margin:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(255,210,0,.10), transparent 25%),
    linear-gradient(135deg,#f5f6f7,#eceff1);
  color:var(--text);
}

button,input,select{
  font:inherit;
}

.app-shell{
  width:min(1500px,96vw);
  margin:24px auto;
  display:grid;
  grid-template-columns:minmax(360px,480px) 1fr;
  gap:22px;
}

.panel{
  background:rgba(255,255,255,.96);
  border:1px solid rgba(88,86,85,.09);
  border-radius:24px;
  box-shadow:0 18px 45px rgba(88,86,85,.12);
}

.form-panel{
  padding:28px;
}

.preview-panel{
  padding:28px;
  overflow:hidden;
}

.brand-mini{
  max-width:360px;
  margin-bottom:28px;
}

.top-logo{
  width:100%;
  height:auto;
  display:block;
}

.heading h1,
.preview-title h2{
  margin:.35rem 0 .55rem;
  color:var(--brand-gray);
}

.heading h1{
  font-size:clamp(28px,3vw,42px);
  line-height:1.05;
}

.heading p{
  margin:0 0 24px;
  color:var(--muted);
  line-height:1.55;
}

.eyebrow{
  display:inline-block;
  color:#7d6300;
  background:#fff6d7;
  border:1px solid #ffe28a;
  padding:7px 11px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.field-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.field-full{
  grid-column:1/-1;
}

.field > span{
  font-size:14px;
  font-weight:800;
  color:var(--brand-gray);
}

.field input,
.field select{
  width:100%;
  border:1px solid #d7dce1;
  background:#fff;
  padding:13px 14px;
  border-radius:12px;
  outline:none;
  transition:.2s ease;
  color:var(--brand-gray);
}

.field input:focus,
.field select:focus{
  border-color:var(--yellow);
  box-shadow:0 0 0 4px rgba(255,210,0,.12);
}

.field input.invalid{
  border-color:var(--danger);
  box-shadow:0 0 0 4px rgba(217,56,43,.08);
}

.error{
  min-height:16px;
  color:var(--danger);
  font-size:12px;
}

.actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:22px;
}

.btn{
  border:0;
  border-radius:12px;
  padding:13px 15px;
  cursor:pointer;
  font-weight:900;
  transition:transform .15s ease, opacity .15s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn-primary{
  background:linear-gradient(180deg,var(--yellow-2),var(--yellow));
  color:var(--brand-gray);
}

.btn-dark{
  background:var(--brand-gray);
  color:#fff;
}

.btn-light{
  grid-column:1/-1;
  background:#edf0f2;
  color:var(--brand-gray);
}

.status{
  margin-top:14px;
  min-height:22px;
  font-size:13px;
  font-weight:700;
}

.status.ok{color:var(--ok);}
.status.error{color:var(--danger);}

.preview-title{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-end;
  margin-bottom:20px;
}

.preview-title h2{
  font-size:28px;
}

.live-badge{
  color:var(--brand-gray);
  background:#f2f4f5;
  border:1px solid #e1e5e8;
  padding:8px 11px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

.preview-wrap{
  overflow:auto;
  padding:12px;
  border-radius:18px;
  background:
    linear-gradient(45deg,#f3f4f5 25%,transparent 25%),
    linear-gradient(-45deg,#f3f4f5 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#f3f4f5 75%),
    linear-gradient(-45deg,transparent 75%,#f3f4f5 75%);
  background-size:20px 20px;
  background-position:0 0,0 10px,10px -10px,-10px 0;
  border:1px solid #e2e5e8;
}

.signature-card{
  width:1120px;
  min-height:390px;
  background:#fff;
  display:grid;
  grid-template-columns:1.1fr 1px 1.15fr 1px 1.35fr;
  grid-template-rows:1fr 72px;
  gap:0;
  box-shadow:0 6px 20px rgba(88,86,85,.14);
  overflow:hidden;
  position:relative;
}

.sig-left,
.sig-center,
.sig-right{
  padding:34px 32px;
}

.sig-left{
  background:
    radial-gradient(circle at 10% 10%,rgba(255,210,0,.08),transparent 30%),
    #fff;
}

.sig-divider{
  background:#d9dde0;
  margin:28px 0 90px;
}

.sig-logo{
  width:100%;
  max-width:290px;
  height:auto;
  display:block;
}

.sig-tagline{
  margin-top:56px;
}

.sig-tagline strong,
.sig-tagline span{
  display:block;
  font-size:23px;
  line-height:1.1;
}

.sig-tagline strong{
  color:var(--brand-gray);
}

.sig-tagline span{
  color:var(--yellow);
  font-weight:900;
  margin-top:4px;
}

.sig-tagline small{
  display:block;
  margin-top:16px;
  color:#8a8786;
  font-size:11px;
  letter-spacing:.18em;
  font-weight:800;
}

.sig-center h3{
  margin:0;
  font-size:30px;
  line-height:1.1;
  color:var(--brand-gray);
}

.sig-center .position{
  margin:8px 0 0;
  font-size:19px;
  font-weight:700;
  color:var(--brand-gray);
}

.sig-center .department{
  margin:3px 0 0;
  color:#747170;
  font-size:16px;
}

.mini-line{
  width:82px;
  height:5px;
  background:var(--yellow);
  margin:17px 0 25px;
}

.contact-row,
.address-row{
  display:flex;
  align-items:flex-start;
  gap:13px;
  margin:18px 0;
  line-height:1.45;
  color:var(--brand-gray);
}

.icon-badge{
  flex:0 0 42px;
  width:42px;
  height:42px;
  border-radius:50%;
  background:var(--brand-gray);
  color:var(--yellow);
  display:grid;
  place-items:center;
  font-size:19px;
  font-weight:900;
}

.label{
  font-weight:800;
  margin-right:4px;
}

.email-wrap{
  min-width:0;
}

#previewEmail{
  color:var(--brand-gray);
  text-decoration:none;
  overflow-wrap:anywhere;
}

.company-title{
  font-size:22px;
  font-weight:900;
  line-height:1.15;
  color:var(--brand-gray);
}

.company-sub{
  font-size:18px;
  margin-top:4px;
  color:var(--brand-gray);
}

.sig-right{
  background:
    radial-gradient(circle at 100% 15%,rgba(255,210,0,.12),transparent 28%),
    #fff;
}

.sig-footer{
  grid-column:1/-1;
  background:linear-gradient(90deg,var(--brand-gray) 0 72%, var(--yellow) 72% 100%);
  color:#fff;
  display:grid;
  grid-template-columns:1fr 1.35fr .95fr;
  align-items:center;
  padding:0 30px;
  font-size:16px;
  font-weight:700;
}

.sig-footer > div{
  padding:0 24px;
}

.footer-message{
  border-left:1px solid rgba(255,255,255,.35);
}

.footer-brand{
  color:var(--brand-gray);
  text-align:right;
  font-weight:900;
  font-size:18px;
}

.hint{
  margin-top:18px;
  color:#6d6a69;
  line-height:1.5;
  font-size:14px;
}

@media(max-width:1050px){
  .app-shell{
    grid-template-columns:1fr;
  }
}

@media(max-width:650px){
  .app-shell{
    width:min(96vw,620px);
    margin:10px auto;
  }

  .form-panel,
  .preview-panel{
    padding:18px;
    border-radius:18px;
  }

  .field-grid,
  .actions{
    grid-template-columns:1fr;
  }

  .field-full,
  .btn-light{
    grid-column:auto;
  }

  .preview-title{
    align-items:flex-start;
    flex-direction:column;
  }
}
