
/* V439E - Agency review center polish */

@media(min-width:761px){
  .v439e-review-center,
  .v439e-review-center *,
  .v439e-preview-validation,
  .v439e-preview-validation *{
    font-size:14px!important;
  }
  .v439e-review-head h2{font-size:20px!important}
  .v439e-order-identity strong{font-size:18px!important}
  .v439e-card-summary .money b{font-size:20px!important}
}

.v439e-review-center{
  padding:16px!important;
  border-radius:14px!important;
}
.v439e-review-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}
.v439e-review-head>div>span{
  display:block;
  font-weight:800;
  letter-spacing:.08em;
  color:var(--muted-foreground);
}
.v439e-review-head h2{
  margin:4px 0 0;
}
.v439e-review-head p{
  margin:5px 0 0;
  color:var(--muted-foreground);
}
.v439e-review-head select{
  min-width:220px;
  height:42px;
  padding:0 10px;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--background);
  color:var(--foreground);
}

.v439e-workflow{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}
.v439e-workflow>div{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:66px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--background);
}
.v439e-workflow>div>b{
  display:flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  flex:none;
  border-radius:999px;
  background:color-mix(in srgb,var(--brand-green) 10%,var(--muted));
  color:var(--brand-green);
}
.v439e-workflow strong,
.v439e-workflow small{
  display:block;
}
.v439e-workflow small{
  margin-top:2px;
  color:var(--muted-foreground);
  line-height:1.35;
}

.v439e-order-list{
  gap:10px!important;
}
.v439e-order-card{
  position:relative;
  padding:0!important;
  border-radius:12px!important;
  overflow:hidden;
  box-shadow:0 3px 14px rgba(15,23,42,.045);
}
.v439e-order-card:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:#94a3b8;
}
.v439e-order-card.reviewing:before{background:#f59e0b}
.v439e-order-card.needs_revision:before{background:#ea580c}
.v439e-order-card.ready:before{background:#2563eb}
.v439e-order-card.converted:before{background:#16a34a}
.v439e-order-card.rejected:before{background:#dc2626}

.v439e-card-head{
  display:grid;
  grid-template-columns:minmax(180px,.8fr) minmax(240px,1.2fr) auto;
  gap:14px;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  background:color-mix(in srgb,var(--muted) 18%,var(--background));
}
.v439e-order-identity>span{
  display:block;
  font-weight:800;
  letter-spacing:.06em;
  color:var(--muted-foreground);
}
.v439e-order-identity>strong{
  display:block;
  margin-top:2px;
}
.v439e-order-identity>small,
.v439e-agency-owner>small{
  display:block;
  margin-top:3px;
  color:var(--muted-foreground);
}
.v439e-agency-owner strong{
  display:block;
}
.v439e-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:4px 9px;
  border-radius:999px;
  font-weight:800;
  white-space:nowrap;
  background:#f1f5f9;
  color:#475569;
}
.v439e-status.reviewing{background:#fef3c7;color:#b45309}
.v439e-status.needs_revision{background:#fff7ed;color:#c2410c}
.v439e-status.ready{background:#dbeafe;color:#1d4ed8}
.v439e-status.converted{background:#dcfce7;color:#15803d}
.v439e-status.rejected{background:#fee2e2;color:#b91c1c}

.v439e-card-summary{
  display:grid;
  grid-template-columns:1.05fr 1.35fr 1.2fr .8fr;
  gap:7px;
  padding:10px 14px;
}
.v439e-card-summary>div{
  min-width:0;
  padding:9px;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--background);
}
.v439e-card-summary span,
.v439e-card-summary b,
.v439e-card-summary small{
  display:block;
}
.v439e-card-summary span{
  color:var(--muted-foreground);
}
.v439e-card-summary b{
  margin-top:4px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.v439e-card-summary small{
  margin-top:3px;
  color:#1d4ed8;
}

.v439e-readiness{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin:0 14px 9px;
}
.v439e-readiness span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:4px 8px;
  border-radius:999px;
  font-weight:700;
}
.v439e-readiness.ready span{
  background:#ecfdf5;
  color:#15803d;
}
.v439e-readiness.warning span{
  background:#fef2f2;
  color:#b91c1c;
}

.v439e-line-preview{
  margin:0 14px!important;
  padding:8px!important;
  grid-template-columns:1fr 1fr!important;
  gap:6px 10px!important;
}
.v439e-line-preview>div{
  min-width:0;
}
.v439e-line-preview>div>div{
  min-width:0;
}
.v439e-line-preview strong,
.v439e-line-preview small{
  display:block;
}
.v439e-line-preview strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.v439e-line-preview small{
  margin-top:2px;
  color:var(--muted-foreground);
}
.v439e-more-lines{
  margin:5px 14px 0;
  color:var(--muted-foreground);
  font-weight:650;
}

.v439e-card-actions{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px!important;
  padding:10px 14px 12px;
  margin-top:0!important;
}
.v439e-card-actions button,
.v439e-card-actions a{
  width:100%;
  min-height:40px!important;
  justify-content:center;
}
.v439e-card-actions button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.v439e-preview-validation{
  margin-top:10px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:8px;
}
.v439e-preview-validation strong,
.v439e-preview-validation small{
  display:block;
}
.v439e-preview-validation.ok{
  border-color:#bbf7d0;
  background:#f0fdf4;
  color:#166534;
}
.v439e-preview-validation.error{
  border-color:#fecaca;
  background:#fef2f2;
  color:#991b1b;
}
.v439e-preview-validation.error>div{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:6px;
}
.v439e-preview-validation.error span{
  padding:4px 7px;
  border-radius:999px;
  background:#fee2e2;
}
.v439d-preview-actions button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

@media(max-width:1100px) and (min-width:761px){
  .v439e-card-summary{
    grid-template-columns:1fr 1fr;
  }
  .v439e-card-actions{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .v439e-workflow{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:760px){
  .v439e-review-center{
    padding:10px!important;
    border-radius:12px!important;
  }
  .v439e-review-head{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    margin-bottom:9px;
  }
  .v439e-review-head>div>span{
    font-size:9px;
  }
  .v439e-review-head h2{
    margin-top:3px;
    font-size:16px;
    line-height:1.25;
  }
  .v439e-review-head p{
    font-size:10px;
    line-height:1.4;
  }
  .v439e-review-head select{
    width:100%;
    min-width:0;
    height:44px;
    font-size:11px;
  }

  .v439e-workflow{
    grid-template-columns:1fr 1fr;
    gap:6px;
  }
  .v439e-workflow>div{
    min-height:70px;
    padding:8px;
    align-items:flex-start;
  }
  .v439e-workflow>div>b{
    width:26px;
    height:26px;
    font-size:9px;
  }
  .v439e-workflow strong{font-size:10px}
  .v439e-workflow small{font-size:8.5px}

  .v439e-order-card{
    border-radius:12px!important;
  }
  .v439e-card-head{
    grid-template-columns:1fr auto;
    gap:7px;
    padding:10px;
  }
  .v439e-order-identity{
    grid-column:1/2;
  }
  .v439e-agency-owner{
    grid-column:1/-1;
    grid-row:2;
    padding-top:7px;
    border-top:1px solid var(--border);
  }
  .v439e-status{
    grid-column:2/3;
    grid-row:1;
    font-size:9px;
    min-height:28px;
  }
  .v439e-order-identity>span{font-size:8px}
  .v439e-order-identity>strong{font-size:14px}
  .v439e-order-identity>small,
  .v439e-agency-owner>small{font-size:9px}
  .v439e-agency-owner strong{font-size:11px}

  .v439e-card-summary{
    grid-template-columns:1fr 1fr;
    gap:6px;
    padding:8px 10px;
  }
  .v439e-card-summary>div{
    min-height:72px;
    padding:8px;
  }
  .v439e-card-summary span{font-size:8.5px}
  .v439e-card-summary b{font-size:10px}
  .v439e-card-summary .money b{font-size:13px}
  .v439e-card-summary small{font-size:8px}

  .v439e-readiness{
    margin:0 10px 8px;
  }
  .v439e-readiness span{
    font-size:9px;
    min-height:26px;
  }

  .v439e-line-preview{
    margin:0 10px!important;
    grid-template-columns:1fr!important;
    padding:7px!important;
  }
  .v439e-line-preview strong{font-size:10px}
  .v439e-line-preview small{font-size:9px}
  .v439e-line-preview>div>b{font-size:10px}
  .v439e-more-lines{
    margin:5px 10px 0;
    font-size:9px;
  }

  .v439e-card-actions{
    grid-template-columns:1fr 1fr!important;
    padding:9px 10px 10px;
  }
  .v439e-card-actions button,
  .v439e-card-actions a{
    min-height:44px!important;
    font-size:10px!important;
  }
  .v439e-card-actions>*:first-child{
    grid-column:1/-1;
  }

  .v439e-preview-validation{
    padding:8px;
  }
  .v439e-preview-validation strong{font-size:10px}
  .v439e-preview-validation small,
  .v439e-preview-validation span{font-size:9px}
}

@media(max-width:390px){
  .v439e-workflow,
  .v439e-card-summary,
  .v439e-card-actions{
    grid-template-columns:1fr!important;
  }
  .v439e-card-actions>*:first-child{
    grid-column:auto;
  }
}
