.ypi-uae-box,
.ypi-uae-panel {
  background: #fff;
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
  padding: 18px;
}

.ypi-uae-box__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.ypi-uae-box__head strong,
.ypi-uae-panel h2 {
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}

.ypi-uae-box__head p,
.ypi-uae-lead,
.ypi-uae-field small {
  color: #64748b;
}

.ypi-uae-box__head p {
  margin: 4px 0 0;
}

.ypi-uae-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.ypi-uae-grid--1 { grid-template-columns: 1fr; }
.ypi-uae-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ypi-uae-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ypi-uae-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ypi-uae-field span {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.ypi-uae-field input,
.ypi-uae-field select,
.ypi-uae-field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
}

.ypi-uae-field input:focus,
.ypi-uae-field select:focus,
.ypi-uae-field textarea:focus {
  border-color: var(--ypi-uae-primary, #089aad);
  box-shadow: 0 0 0 1px var(--ypi-uae-primary, #089aad);
}

.ypi-uae-field.is-muted {
  opacity: .55;
}

.ypi-uae-offplan {
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.ypi-uae-offplan h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 14px;
}

.ypi-uae-warning {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
}

.ypi-uae-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.ypi-uae-badge--manual_verified {
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}

.ypi-uae-badge--pending {
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.ypi-uae-badge--missing,
.ypi-uae-badge--failed,
.ypi-uae-badge--expired {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.ypi-uae-admin h1 {
  font-weight: 700;
}

.ypi-uae-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.ypi-uae-card {
  padding: 16px;
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, var(--ypi-uae-soft, #eaf8fb));
}

.ypi-uae-card span {
  display: block;
  min-height: 32px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.ypi-uae-card strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 28px;
}

.ypi-uae-panel {
  margin-top: 16px;
}

.ypi-uae-inline-form {
  display: inline-block;
  margin-right: 8px;
}

.ypi-uae-table td,
.ypi-uae-table th {
  vertical-align: middle;
}

.ypi-uae-public-badge,
.ypi-uae-public-facts {
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  background: #fff;
}

.ypi-uae-public-badge {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
}

.ypi-uae-public-badge a {
  color: var(--ypi-uae-primary, #089aad);
  font-weight: 700;
  text-decoration: none;
}

.ypi-uae-public-badge__permit {
  color: #334155;
  font-weight: 700;
}

.ypi-uae-public-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.ypi-uae-public-facts div {
  padding: 12px;
  background: #f8fafc;
}

.ypi-uae-public-facts span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.ypi-uae-public-facts strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
}

@media (max-width: 960px) {
  .ypi-uae-grid--2,
  .ypi-uae-grid--3,
  .ypi-uae-cards,
  .ypi-uae-public-facts {
    grid-template-columns: 1fr;
  }

  .ypi-uae-box__head {
    flex-direction: column;
  }
}

.ypi-uae-box--frontend {
  margin: 20px 0;
}

.ypi-uae-regulatory-compact,
.ypi-uae-offplan {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5eaf0;
}

.ypi-uae-regulatory-compact h3,
.ypi-uae-offplan h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #0f172a;
}

.ypi-uae-mode-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ypi-uae-mode-card {
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  background: #f8fbfc;
  padding: 14px;
}

.ypi-uae-mode-card strong {
  color: var(--ypi-uae-primary, #089aad);
  display: block;
  margin-bottom: 6px;
}

.ypi-uae-mode-card p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .ypi-uae-mode-matrix {
    grid-template-columns: 1fr;
  }
}

/* v0.4.0 - admin workflow builder. */
.ypi-uae-admin textarea.code{min-height:150px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:1.55;}

.ypi-uae-workflow-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  background: #fff;
}

.ypi-uae-workflow-table {
  min-width: 1180px;
}

.ypi-uae-workflow-table th,
.ypi-uae-workflow-table td {
  vertical-align: middle;
}

.ypi-uae-workflow-table code {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef6f8;
  color: #0f6470;
}

.ypi-uae-workflow-table input[type="text"] {
  width: 160px;
}

.ypi-uae-workflow-table input[type="number"] {
  width: 72px;
}

.ypi-uae-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eaf8fb;
  color: #0f6470;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.ypi-uae-submit-field--checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}

.ypi-uae-submit-field--checkbox input {
  width: auto !important;
  min-height: 0 !important;
}

/* v0.4.3 compact workflow builder */
.ypi-uae-workflow-panel--compact{overflow:hidden;}
.ypi-uae-workflow-legend{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px;}
.ypi-uae-workflow-legend span{display:inline-flex;gap:4px;align-items:center;padding:7px 10px;border:1px solid #d8e7ea;border-radius:8px;background:#f7fbfc;color:#344054;font-size:12px;}
.ypi-uae-workflow-mode-grid{display:grid;grid-template-columns:1fr;gap:18px;}
.ypi-uae-workflow-mode-card{border:1px solid #d8e7ea;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 6px 18px rgba(16,24,40,.04);}
.ypi-uae-workflow-mode-card__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:linear-gradient(180deg,#f7fbfc,#eef8fa);border-bottom:1px solid #d8e7ea;}
.ypi-uae-workflow-mode-card__head h3{margin:0;font-size:15px;font-weight:700;color:#0f172a;}
.ypi-uae-workflow-mode-card__head p{margin:0;font-size:12px;color:#667085;}
.ypi-uae-workflow-compact-table-wrap{overflow:auto;max-height:620px;}
.ypi-uae-workflow-compact-table{min-width:860px;border:0 !important;}
.ypi-uae-workflow-compact-table thead th{position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid #d8e7ea;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#667085;}
.ypi-uae-workflow-compact-table th,.ypi-uae-workflow-compact-table td{vertical-align:middle;padding:8px 10px;}
.ypi-uae-workflow-field-name strong{display:block;font-size:13px;color:#111827;margin-bottom:3px;}
.ypi-uae-workflow-field-name code{font-size:11px;background:#f2f4f7;border-radius:6px;padding:2px 5px;color:#475467;}
.ypi-uae-section-input{width:100%;max-width:180px;min-height:32px;border-radius:7px !important;}
.ypi-uae-order-input{width:72px;min-height:32px;border-radius:7px !important;}
.ypi-uae-switch{position:relative;display:inline-flex;align-items:center;justify-content:center;width:38px;height:22px;}
.ypi-uae-switch input{position:absolute;opacity:0;pointer-events:none;}
.ypi-uae-switch span{display:block;width:34px;height:18px;border-radius:999px;background:#d0d5dd;box-shadow:inset 0 0 0 1px rgba(16,24,40,.08);transition:.15s ease;}
.ypi-uae-switch span:before{content:"";display:block;width:14px;height:14px;margin:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(16,24,40,.25);transition:.15s ease;}
.ypi-uae-switch input:checked + span{background:#089aad;}
.ypi-uae-switch input:checked + span:before{transform:translateX(16px);}
.ypi-uae-switch input:focus-visible + span{outline:2px solid rgba(8,154,173,.35);outline-offset:2px;}
/* Keep every workflow mode on its own row, even on large admin screens. */
.ypi-uae-workflow-mode-grid{grid-template-columns:1fr !important;}
@media (max-width: 782px){.ypi-uae-workflow-mode-card__head{align-items:flex-start;flex-direction:column}.ypi-uae-workflow-compact-table{min-width:760px}.ypi-uae-workflow-compact-table-wrap{max-height:none}.ypi-uae-section-input{max-width:150px}}
