/* Financial, previous projects, profile view shells */
.financial-info-form {
  max-width: min(100%, var(--ib-content-max, 1180px));
  width: 100%;
  margin: 0 auto;
  padding: var(--ib-space-4) 0;
  box-sizing: border-box;
}

.financial-info-form .form-content {
  background: var(--ib-surface-card);
  border: 1px solid var(--ib-outline-light);
  border-radius: var(--ib-radius-lg);
  box-shadow: var(--ib-shadow);
  padding: var(--ib-space-6);
}

.financial-info-form .form-header {
  text-align: left;
  margin-bottom: var(--ib-space-6);
  background: linear-gradient(135deg, var(--ib-primary) 0%, #a11c1c 100%);
  border-radius: var(--ib-radius-lg);
  padding: var(--ib-space-8) var(--ib-space-6);
  box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.3);
  position: relative;
  overflow: hidden;
}

.financial-info-form .form-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}

.supplier-feedback-reviews-form .form-header,
.contractor-document-upload-form .form-header,
.supplier-document-upload-form .form-header {
  text-align: left;
  margin-bottom: var(--ib-space-6);
  background: linear-gradient(135deg, var(--ib-primary) 0%, #a11c1c 100%);
  border-radius: var(--ib-radius-lg);
  padding: var(--ib-space-8) var(--ib-space-6);
  box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.3);
}

.supplier-feedback-reviews-form .form-header h2,
.contractor-document-upload-form .form-header h2,
.supplier-document-upload-form .form-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.financial-info-form .form-section {
  margin-bottom: var(--ib-space-5);
  padding-bottom: var(--ib-space-4);
  border-bottom: 1px solid var(--ib-outline-light);
}

.financial-info-form .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--ib-space-4);
}

.previous-projects-form {
  max-width: min(100%, var(--ib-content-max, 1180px));
  margin: 0 auto;
  padding: var(--ib-space-4) 0;
}

.previous-projects-form .tab-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ib-space-3);
  margin-bottom: var(--ib-space-5);
  background: linear-gradient(135deg, var(--ib-primary) 0%, #a11c1c 100%);
  border-radius: var(--ib-radius-lg);
  padding: var(--ib-space-6);
  box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.3);
}

.previous-projects-form .tab-heading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.previous-projects-form .add-project-button,
.previous-projects-form .delete-project-button {
  border: none;
  border-radius: var(--ib-radius-sm);
  padding: 9px 16px;
  font-size: var(--ib-text-sm);
  font-weight: 600;
  cursor: pointer;
}

.previous-projects-form .add-project-button {
  background: var(--ib-primary);
  color: #fff;
}

.previous-projects-form .delete-project-button {
  background: var(--ib-error-bg);
  color: var(--ib-error);
}

.previous-projects-form .project-card {
  background: var(--ib-surface-card);
  border: 1px solid var(--ib-outline-light);
  border-radius: var(--ib-radius-lg);
  padding: var(--ib-space-5);
  margin-bottom: var(--ib-space-4);
  box-shadow: var(--ib-shadow);
}

.previous-projects-form .project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--ib-space-4);
}

.previous-projects-form .project-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ib-space-4);
}

.previous-projects-form .project-field-grid .full-span {
  grid-column: 1 / -1;
}

.previous-projects-form .project-field-grid input,
.previous-projects-form .project-field-grid textarea,
.previous-projects-form .project-field-grid select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--ib-outline);
  border-radius: var(--ib-radius-sm);
  font-size: var(--ib-text-md);
  box-sizing: border-box;
}

.previous-projects-form .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--ib-space-4);
}

.contractor-profile-view,
.supplier-profile-view {
  max-width: min(100%, var(--ib-content-max, 1180px));
  margin: 0 auto;
  padding: var(--ib-space-4) 0;
}

.contractor-profile-view .profile-header,
.supplier-profile-view .profile-header {
  margin-bottom: var(--ib-space-5);
}

.contractor-profile-view .header-title-bar,
.supplier-profile-view .header-title-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ib-space-3);
}

.contractor-profile-view .header-title-bar h1,
.supplier-profile-view .header-title-bar h1 {
  margin: 0;
  font-size: var(--ib-text-2xl);
  font-weight: 800;
  color: var(--ib-on-surface);
}

.contractor-profile-view .back-button,
.supplier-profile-view .back-button {
  font-size: var(--ib-text-sm);
  font-weight: 600;
  color: var(--ib-primary);
  text-decoration: none;
}

.contractor-profile-view .profile-content-single-page,
.supplier-profile-view .profile-content-single-page {
  display: flex;
  flex-direction: column;
  gap: var(--ib-space-4);
}

.contractor-profile-view .profile-summary-card,
.supplier-profile-view .profile-summary-card,
.contractor-profile-view .profile-section,
.supplier-profile-view .profile-section {
  background: var(--ib-surface-card);
  border: 1px solid var(--ib-outline-light);
  border-radius: var(--ib-radius-lg);
  padding: var(--ib-space-5);
  box-shadow: var(--ib-shadow);
}

.contractor-profile-view .section-header h3,
.supplier-profile-view .section-header h3 {
  margin: 0 0 var(--ib-space-4);
  font-size: var(--ib-text-lg);
  font-weight: 700;
  color: var(--ib-on-surface);
  border-bottom: 2px solid var(--ib-primary);
  padding-bottom: var(--ib-space-2);
  display: inline-block;
}

.contractor-profile-view .readonly-field-group,
.supplier-profile-view .readonly-field-group {
  margin-bottom: var(--ib-space-3);
}

.contractor-profile-view .readonly-field-group label,
.supplier-profile-view .readonly-field-group label {
  display: block;
  font-size: var(--ib-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ib-on-surface-muted);
  margin-bottom: 0.25rem;
}

.contractor-profile-view .readonly-value,
.supplier-profile-view .readonly-value {
  color: var(--ib-on-surface);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .previous-projects-form .project-field-grid {
    grid-template-columns: 1fr;
  }
}

.document-required {
  color: var(--ib-error);
  font-weight: 700;
}

.document-card--missing {
  border-color: rgba(220, 38, 38, 0.45) !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.certifications-compliance-form .products-services-section {
  margin-bottom: var(--ib-space-5);
  padding: var(--ib-space-5);
  background: var(--ib-surface-card);
  border: 1px solid var(--ib-outline-light);
  border-radius: var(--ib-radius);
  box-shadow: var(--ib-shadow);
}

.certifications-compliance-form .products-services-section.field-invalid,
.certifications-compliance-form .document-card.field-invalid {
  border-color: var(--ib-error);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.cert-compliance-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--ib-space-3);
}

.cert-compliance-field input[type="text"],
.cert-compliance-field input[type="month"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ib-outline);
  border-radius: var(--ib-radius-sm);
  font-size: var(--ib-text-sm);
}

.cert-compliance-field.field-invalid input {
  border-color: var(--ib-error);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.certifications-compliance-content .document-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ib-space-2);
  flex-wrap: wrap;
}

.month-year-expiry-card {
  background: linear-gradient(180deg, var(--ib-surface-card) 0%, var(--ib-surface-hover) 100%);
  border: 1px solid var(--ib-outline-light);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--ib-shadow);
}

.month-year-expiry-card.field-invalid {
  border-color: var(--ib-error);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.month-year-expiry-card__label {
  display: block;
  font-weight: 600;
  font-size: var(--ib-text-sm);
  color: var(--ib-on-surface);
  margin-bottom: 10px;
}

.month-year-expiry-card__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.month-year-expiry-card__input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 12px 14px;
  border: 2px solid var(--ib-outline);
  border-radius: 10px;
  font-size: var(--ib-text-sm);
  font-family: inherit;
  color: var(--ib-on-surface);
  background: var(--ib-surface-card);
  cursor: pointer;
  transition: all var(--ib-transition);
  box-sizing: border-box;
}

.month-year-expiry-card__input:hover { border-color: var(--ib-outline); }
.month-year-expiry-card__input:focus {
  outline: none;
  border-color: var(--ib-primary);
  box-shadow: 0 0 0 3px var(--ib-primary-light);
}

.month-year-expiry-card__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: var(--ib-text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ib-on-surface-muted);
  background: var(--ib-surface-hover);
  border: 1px dashed var(--ib-outline);
  white-space: nowrap;
}

.month-year-expiry-card__pill--filled {
  color: var(--ib-primary-dark);
  background: var(--ib-primary-light);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-style: solid;
}

.month-year-expiry-card__help {
  margin: 10px 0 0;
  font-size: var(--ib-text-xs);
  color: var(--ib-on-surface-muted);
  line-height: 1.4;
}

.debit-card-expiry-ccv-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(140px, 1fr);
  gap: var(--ib-space-4);
  align-items: start;
}

@media (max-width: 768px) {
  .debit-card-expiry-ccv-row { grid-template-columns: 1fr; }
}

.document-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ib-space-3);
  margin-bottom: var(--ib-space-3);
}

.document-label {
  font-size: var(--ib-text-sm);
  font-weight: 700;
  color: var(--ib-on-surface);
}

.doc-upload-form .document-required {
  color: var(--ib-error);
  font-weight: 700;
}

/* ─── Financial: debit card actions (Owner / Supplier / Contractor Blazor) ─── */
.security-section-header,
.financial-info-form .section-header,
.financial-cards-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ib-space-3);
  margin-bottom: var(--ib-space-4);
}

.security-section-badge,
.financial-info-form .section-header h3 {
  margin: 0;
  font-size: var(--ib-text-md);
  font-weight: 700;
  color: var(--ib-on-surface);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ib-primary);
}

.btn-add-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--ib-primary);
  border-radius: var(--ib-radius-sm);
  background: var(--ib-primary-light);
  color: var(--ib-primary);
  font-size: var(--ib-text-sm);
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ib-transition), color var(--ib-transition), border-color var(--ib-transition), box-shadow var(--ib-transition);
}

.btn-add-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ib-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.btn-add-card:hover {
  background: var(--ib-primary);
  color: #fff;
  border-color: var(--ib-primary);
  box-shadow: var(--ib-shadow);
}

.btn-add-card:hover .btn-add-card__icon {
  background: #fff;
  color: var(--ib-primary);
}

.btn-remove-card {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--ib-radius-sm);
  background: transparent;
  color: var(--ib-error);
  font-size: var(--ib-text-xs);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--ib-transition), border-color var(--ib-transition), color var(--ib-transition);
}

.btn-remove-card:hover {
  background: var(--ib-error-bg);
  border-color: var(--ib-error);
  color: var(--ib-error);
}

.financial-info-form .card-entry,
.security-authentication-form .card-entry-shell {
  margin-bottom: var(--ib-space-4);
  padding: var(--ib-space-4);
  border: 1px solid var(--ib-outline-light);
  border-radius: var(--ib-radius);
  background: var(--ib-surface);
}

.financial-info-form .card-header,
.security-authentication-form .card-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ib-space-3);
  margin-bottom: var(--ib-space-3);
}

.financial-info-form .card-header h5,
.security-authentication-form .card-entry-header strong {
  margin: 0;
  font-size: var(--ib-text-md);
  font-weight: 700;
  color: var(--ib-on-surface);
}

/* Supplier Products & Services */
.supplier-products-services-form {
  max-width: min(100%, var(--ib-content-max, 1180px));
  width: 100%;
  margin: 0 auto;
  padding: var(--ib-space-4) 0 var(--ib-space-8);
}

.products-services-hero {
  margin-bottom: var(--ib-space-5);
  padding: var(--ib-space-8) var(--ib-space-6);
  background: linear-gradient(135deg, var(--ib-primary, #dc2626) 0%, #a11c1c 100%) !important;
  border: none !important;
  border-radius: var(--ib-radius-lg);
  box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.3) !important;
  text-align: left;
  color: #fff !important;
}

.products-services-eyebrow {
  margin: 0 0 8px;
  font-size: var(--ib-text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.products-services-hero h1 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}

.products-services-hint {
  margin: 0 0 var(--ib-space-5);
  font-size: var(--ib-text-sm);
  color: var(--ib-on-surface-muted);
  line-height: 1.5;
}

.products-services-hero .products-services-hint {
  color: rgba(255, 255, 255, 0.85);
}

.products-services-content {
  display: flex;
  flex-direction: column;
  gap: var(--ib-space-5);
  padding: var(--ib-space-6);
  background: var(--ib-surface-card);
  border: 1px solid var(--ib-outline-light);
  border-radius: var(--ib-radius-lg);
  box-shadow: var(--ib-shadow);
}

.products-services-section {
  display: flex;
  flex-direction: column;
  gap: var(--ib-space-4);
  padding-bottom: var(--ib-space-5);
  border-bottom: 1px solid var(--ib-outline-light);
}

.products-services-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.products-services-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ib-space-3);
  flex-wrap: wrap;
}

.products-services-section__head h2 {
  margin: 0;
  font-size: var(--ib-text-md);
  font-weight: 700;
  color: var(--ib-on-surface);
}

.products-services-count {
  font-size: var(--ib-text-xs);
  font-weight: 700;
  color: var(--ib-on-surface-muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ib-surface-hover);
  border: 1px solid var(--ib-outline-light);
}

.products-services-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.products-services-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 999px;
  background: var(--ib-primary-light);
  color: var(--ib-primary-dark);
  font-size: var(--ib-text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--ib-transition), border-color var(--ib-transition);
}

.products-services-tag:hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: var(--ib-primary);
}

.products-services-tag__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.15);
  font-size: 14px;
  line-height: 1;
}

.option-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.option-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--ib-outline-light);
  border-radius: 12px;
  background: var(--ib-surface-card);
  cursor: pointer;
  transition: border-color var(--ib-transition), background-color var(--ib-transition), box-shadow var(--ib-transition), transform var(--ib-transition);
  user-select: none;
}

.option-chip:hover {
  border-color: rgba(220, 38, 38, 0.35);
  background: var(--ib-surface-hover);
}

.option-chip--selected {
  border-color: var(--ib-primary);
  background: var(--ib-primary-light);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.option-chip__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.option-chip__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ib-outline);
  border-radius: 6px;
  background: #fff;
  transition: border-color var(--ib-transition), background-color var(--ib-transition);
}

.option-chip--selected .option-chip__box {
  border-color: var(--ib-primary);
  background: var(--ib-primary);
  box-shadow: inset 0 0 0 3px #fff;
}

.option-chip__text {
  flex: 1;
  font-size: var(--ib-text-sm);
  font-weight: 600;
  color: var(--ib-on-surface);
  line-height: 1.4;
  word-break: break-word;
}

.products-services-empty {
  padding: var(--ib-space-5);
  border-radius: var(--ib-radius);
  background: var(--ib-surface-hover);
  color: var(--ib-on-surface-muted);
  font-size: var(--ib-text-sm);
  text-align: center;
}

.products-services-feedback {
  margin-bottom: var(--ib-space-4);
  padding: 12px 16px;
  border-radius: var(--ib-radius-sm);
  font-size: var(--ib-text-sm);
  font-weight: 600;
}

.products-services-feedback.error {
  background: var(--ib-error-bg);
  color: var(--ib-error);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.products-services-feedback.success {
  background: var(--ib-success-bg);
  color: var(--ib-success);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.products-services-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--ib-space-2);
}

.supplier-products-services-form .save-button {
  min-width: 140px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--ib-radius-sm);
  background: var(--ib-primary);
  color: #fff;
  font-size: var(--ib-text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--ib-transition), transform var(--ib-transition);
}

.supplier-products-services-form .save-button:hover:not(:disabled) {
  background: var(--ib-primary-dark);
  transform: translateY(-1px);
}

.supplier-products-services-form .save-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .option-chip-grid { grid-template-columns: 1fr; }
  .products-services-content { padding: var(--ib-space-4); }
}

.grade-select {
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  border: 1px solid var(--ib-outline);
  border-radius: var(--ib-radius-sm);
  font-size: var(--ib-text-sm);
  font-family: inherit;
  background: var(--ib-surface-card);
}

.security-actions--start {
  justify-content: flex-start;
  gap: 8px;
}

.card-entry-shell {
  margin-bottom: 10px;
}
