:root{
  --brand:#218CCF;
  --brand-dark:#0A4E73;
  --soft:#f5fbff;
  --border:#dbe7f1;
  --ink:#0a3246;
}

/* Page head */
.page-head{ padding:28px 0; background:linear-gradient(180deg,#f7fbff,#fff); border-bottom:1px solid var(--border); }
.page-head .wrap{ max-width:1100px; margin:0 auto; padding:0 16px; }
.form-head{ margin:0; color:var(--brand-dark); font-weight:800; }
.page-head .sub{ margin:.35rem 0 0; color:#64748b; }

/* Layout */
.wrap{ max-width:1100px; margin:0 auto; padding:20px 16px; }

/* Card + tabs */
.card.soft{ background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow:0 10px 28px rgba(0,0,0,.06); }
.ps-tabs{ padding:0; overflow:hidden; }
.ps-tabbar{
  display:flex; gap:8px; flex-wrap:wrap; padding:10px; border-bottom:1px solid var(--border);
  background:linear-gradient(180deg,#fff,#f8fbff);
}
.ps-tab{
  appearance:none; border:1px solid #e6eef4; background:#fff; color:var(--brand-dark);
  border-radius:999px; padding:.55rem .9rem; font-weight:800; cursor:pointer;
}
.ps-tab.active{ background:var(--brand); color:#fff; border-color:var(--brand); }
.ps-panel{ padding:16px; }
.ps-panel[hidden]{ display:none; }

/* Alerts */
.ps-alert{ margin:12px 16px; padding:12px 14px; border-radius:12px; font-weight:700; }
.ps-alert.hidden{ display:none; }
.ps-alert.ok{ background:#e8f5e9; color:#0b7d3a; border:1px solid #cfe8d5; }
.ps-alert.err{ background:#fdecea; color:#b42318; border:1px solid #f5c2c0; }

/* Form */
.form-card{ background:#fff; border:1px solid var(--border); border-radius:16px; padding:18px; }
.form-grid{ display:grid; gap:14px; grid-template-columns:1fr 1fr; }
.form-field{ display:flex; flex-direction:column; gap:6px; }
.form-field.span-2{ grid-column:1 / -1; }
label{ font-weight:800; color:var(--brand-dark); }
.req{ color:#b42318; }
.muted{ color:#64748b; }
.hint{ color:#64748b; font-size:.9rem; margin-top:.1rem; }

input, select, textarea{
  border:1px solid #e6eef4; border-radius:12px; padding:.65rem .8rem; font-weight:600; color:var(--ink);
  background:#fff; outline:0;
}
input:focus, select:focus, textarea:focus{
  border-color:#cfeaf7; box-shadow:0 0 0 .2rem rgba(33,140,207,.12);
}
.invalid-feedback{ display:none; color:#b42318; font-weight:700; }
input:invalid ~ .invalid-feedback,
select:invalid ~ .invalid-feedback,
textarea:invalid ~ .invalid-feedback{ display:block; }

/* Check row */
.check-row{ display:flex; gap:14px; flex-wrap:wrap; }
.label-block{ display:inline-block; font-weight:800; color:var(--brand-dark); }

/* Table card */
.table-card{ margin-top:12px; border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.table-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; background:linear-gradient(135deg,#0A4E73,#218CCF,#12D8E0); color:#fff;
}
.table-scroll{ overflow:auto; }
.ps-table{ width:100%; border-collapse:collapse; }
.ps-table th, .ps-table td{ border-bottom:1px solid #eef4f8; padding:10px 8px; text-align:left; }
.ps-table th{ color:#0a3246; background:#f8fbff; font-weight:800; position:sticky; top:0; z-index:1; }
.ps-table td input{
  width:100%; border:1px solid #e6eef4; border-radius:8px; padding:.45rem .55rem; font-weight:600; color:#0a3246;
}
.ps-table td .row-del{
  background:#fff; border:1px solid #fde2e1; color:#b42318; border-radius:8px; padding:.35rem .55rem; cursor:pointer; font-weight:800;
}
.ps-table td .row-del:hover{ background:#fdecea; }

/* Buttons */
.form-actions{ display:flex; gap:10px; align-items:center; justify-content:flex-start; margin-top:14px; }
.btn{
  background:linear-gradient(135deg,#0A4E73,#218CCF,#12D8E0); color:#fff; border-radius:999px; font-weight:800; padding:.65rem 1.1rem; border:0;
  display:inline-flex; align-items:center; gap:.55rem; cursor:pointer;
  box-shadow:0 10px 22px rgba(33,140,207,.22);
  transition:transform .18s ease, box-shadow .18s ease, opacity .2s ease;
}
.btn:hover{ transform:translateY(-2px); box-shadow:0 0 0 1px rgba(18,216,224,.18), 0 16px 34px rgba(18,216,224,.2); }
.btn.small{ padding:.4rem .75rem; font-weight:800; }
.btn[disabled]{ opacity:.6; cursor:not-allowed; }
.btn.alt{ background:#fff; color:var(--brand-dark); border:1px solid var(--border); }

/* Spinner */
.btn-send .spin{ display:none; width:1.05rem; height:1.05rem; }
.btn-send .spin svg{ width:100%; height:100%; }
.btn-send .spin circle{
  fill:none; stroke:#fff; stroke-width:4; stroke-linecap:round;
  stroke-dasharray:126; stroke-dashoffset:110; animation:spin 1s linear infinite; transform-origin:center;
}
.btn-send.loading .lbl{ opacity:.75; }
.btn-send.loading .spin{ display:inline-flex; }
@keyframes spin{ to{ transform:rotate(360deg); stroke-dashoffset:0; } }

.recaptcha-box{ margin-top:12px; }
.hp{ display:none !important; }

@media (max-width: 820px){
  .form-grid{ grid-template-columns:1fr; }
}