/* ===================================================================
   TSC Vendor Application Form — Modern Stylesheet
   =================================================================== */

/* ----- Reset & Base ----- */
.tsc-form-wrapper {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 2rem 2.25rem;
  border-radius: 12px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 16px rgba(0,0,0,.04);
  color: #1a1a2e;
  line-height: 1.6;
}

.tsc-form-wrapper *,
.tsc-form-wrapper *::before,
.tsc-form-wrapper *::after {
  box-sizing: border-box;
}

/* ----- Typography ----- */
.tsc-form-wrapper h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #111;
}

/* ----- Alert Banners (discount, intro, deadline) ----- */
.tsc-alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.tsc-alert--success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.tsc-alert--error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.tsc-alert--info {
  background: #f0f7ff;
  border: 1px solid #93c5fd;
  color: #1e3a5f;
}

.tsc-alert p {
  margin: 0;
}
.tsc-alert p + p {
  margin-top: 6px;
}

.tsc-alert strong {
  font-weight: 700;
}

/* ----- Form Field Groups ----- */
.tsc-field-group {
  margin-bottom: 1.15rem;
}

.tsc-field-group label.tsc-field-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #334155;
  letter-spacing: 0.01em;
}

.tsc-field-group label.tsc-field-label .tsc-required {
  color: #dc2626;
  margin-left: 2px;
}

/* ----- Inputs, Selects, Textareas ----- */
.tsc-form-wrapper input[type="text"],
.tsc-form-wrapper input[type="email"],
.tsc-form-wrapper input[type="number"],
.tsc-form-wrapper input[type="tel"],
.tsc-form-wrapper input[type="url"],
.tsc-form-wrapper select,
.tsc-form-wrapper textarea {
  display: block;
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a2e;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  margin: 0;
}

.tsc-form-wrapper input:focus,
.tsc-form-wrapper select:focus,
.tsc-form-wrapper textarea:focus {
  border-color: #1e88e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(30,136,229,.15);
}

.tsc-form-wrapper textarea {
  resize: vertical;
  min-height: 100px;
}

.tsc-form-wrapper select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ----- Sections (Fieldsets) ----- */
.tsc-form-wrapper fieldset,
.tsc-form-section {
  border: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.tsc-form-wrapper fieldset legend,
.tsc-section-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #111;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
  width: 100%;
  display: block;
}

.tsc-section-desc {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 1rem;
  line-height: 1.55;
}

.tsc-section-desc small {
  color: #94a3b8;
}

/* ----- Contact Groups ----- */
.tsc-contact-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  position: relative;
  margin-bottom: 0.75rem;
}

.tsc-contact-group strong {
  font-size: 0.95rem;
  color: #334155;
}

.tsc-contact-group label {
  display: block !important;
  font-weight: 500;
  font-size: 0.85rem;
  color: #475569;
  margin-top: 0.6rem;
  margin-bottom: 0;
  gap: 0 !important;
}

.tsc-contact-group input {
  margin-top: 4px;
}

.tsc-remove-contact {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none !important;
  border: none !important;
  font-size: 0.8rem;
  color: #ef4444 !important;
  cursor: pointer;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  transition: background 0.15s ease;
}

.tsc-remove-contact:hover {
  background: #fef2f2 !important;
}

/* ----- Buttons ----- */
.tsc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}

.tsc-btn--primary {
  background: #1e88e5;
  color: #fff;
  box-shadow: 0 1px 3px rgba(30,136,229,.3);
}

.tsc-btn--primary:hover {
  background: #1565c0;
  box-shadow: 0 2px 6px rgba(30,136,229,.35);
  transform: translateY(-1px);
}

.tsc-btn--primary:active {
  transform: translateY(0);
}

.tsc-btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tsc-btn--secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.tsc-btn--secondary:hover {
  background: #e2e8f0;
}

.tsc-btn--danger {
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.tsc-btn--danger:hover {
  background: #fef2f2;
  border-color: #f87171;
}

/* ----- Submit Button ----- */
.tsc-form-wrapper input[type="submit"] {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 2rem;
  background: #1e88e5;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(30,136,229,.3);
  letter-spacing: 0.02em;
  width: 100%;
  max-width: 400px;
}

.tsc-form-wrapper input[type="submit"]:hover {
  background: #1565c0;
  box-shadow: 0 4px 12px rgba(30,136,229,.35);
  transform: translateY(-1px);
}

.tsc-form-wrapper input[type="submit"]:active {
  transform: translateY(0);
}

.tsc-form-wrapper input[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tsc-submit-wrap {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid #e2e8f0;
}

.tsc-submit-wrap p.tsc-submit-note {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 1rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ----- Photo Uploads ----- */
.tsc-photo-upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tsc-photo-upload-item:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.tsc-photo-upload-item input[type="file"] {
  font-size: 0.85rem;
  color: #475569;
  flex: 1;
  min-width: 0;
}

.tsc-photo-upload-item input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  background: #e2e8f0;
  color: #334155;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.15s ease;
}

.tsc-photo-upload-item input[type="file"]::file-selector-button:hover {
  background: #cbd5e1;
}

.tsc-photo-preview {
  margin-top: 8px;
}

.tsc-photo-preview img {
  max-width: 160px;
  max-height: 120px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  object-fit: cover;
}

.tsc-remove-photo {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px !important;
  background: #fff !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  border-radius: 6px !important;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.tsc-remove-photo:hover {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
}

#tsc-add-photo:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ----- Checkbox / Agreement Section ----- */
.tsc-agreement-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tsc-agreement-row:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.tsc-agreement-row input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  margin: 2px 0 0 0 !important;
  cursor: pointer;
  accent-color: #1e88e5;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
  flex-shrink: 0 !important;
}

.tsc-agreement-row span {
  flex: 1;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.5;
  font-weight: 400;
}

.tsc-agreement-row a {
  color: #1e88e5;
  text-decoration: underline;
  font-weight: 600;
}

.tsc-agreement-row a:hover {
  color: #1565c0;
}

/* ----- Stripe / Payment Section ----- */
.tsc-payment-section {
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.tsc-payment-section p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
}

#card-element {
  border: 1.5px solid #cbd5e1;
  padding: 0.75rem;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#card-element.StripeElement--focus {
  border-color: #1e88e5;
  box-shadow: 0 0 0 3px rgba(30,136,229,.15);
}

#card-errors {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ----- Map Spot Picker ----- */
#tsc-application-spot-picker {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

#vendor_spot_label {
  min-width: 240px;
}

/* ----- Modals ----- */
.tsc-modal-overlay {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  backdrop-filter: blur(2px);
}

.tsc-modal-content {
  font-family: inherit;
  font-size: 1rem;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 28px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  margin-top: max(20px, calc((100vh - 80vh) / 2));
}

.tsc-modal-content h2 {
  margin-top: 0;
  padding-right: 30px;
}

.tsc-modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 20px;
  cursor: pointer;
  color: #475569;
  width: 32px;
  height: 32px;
  line-height: 30px;
  text-align: center;
  z-index: 10;
  padding: 0;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.tsc-modal-close-btn:hover {
  background: #e2e8f0 !important;
  color: #111 !important;
}

.tsc-modal-footer-btn {
  background: #1e88e5;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.tsc-modal-footer-btn:hover {
  background: #1565c0 !important;
}

/* ----- Success Modal ----- */
.tsc-success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.tsc-success-modal {
  background: #fff;
  border-radius: 14px;
  max-width: 560px;
  width: 92%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  padding: 2rem 2rem 1.75rem;
  text-align: center;
}

.tsc-success-modal h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.35rem;
  color: #111;
}

.tsc-success-modal p {
  margin: 0.35rem 0;
  color: #475569;
  font-size: 0.95rem;
}

.tsc-success-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 30px;
}

.tsc-success-close {
  margin-top: 1rem;
  display: inline-block;
  background: #1e88e5;
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(30,136,229,.3);
}

.tsc-success-close:hover {
  background: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,136,229,.35);
  color: #fff;
  text-decoration: none;
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
  .tsc-form-wrapper {
    padding: 1.25rem 1rem;
    border-radius: 8px;
  }

  .tsc-photo-upload-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .tsc-form-wrapper input[type="submit"] {
    max-width: 100%;
  }
}

/* ===================================================================
   TSC Vendor Portal — Dashboard, Login, Directory
   =================================================================== */

/* ----- Portal Wrapper ----- */
.tsc-portal-wrap {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  color: #1a1a2e;
  line-height: 1.6;
}

.tsc-portal-wrap *,
.tsc-portal-wrap *::before,
.tsc-portal-wrap *::after {
  box-sizing: border-box;
}

/* ----- Portal Header ----- */
.tsc-portal-header {
  margin-bottom: 1.5rem;
}

.tsc-portal-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 4px;
}

.tsc-portal-welcome {
  font-size: 1rem;
  color: #5f8a84;
  margin: 0;
}

/* ----- Tabs ----- */
.tsc-portal-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tsc-tab {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  background: none;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.tsc-tab:hover {
  color: #2a9d8f;
}

.tsc-tab.active {
  color: #2a9d8f;
  border-bottom-color: #2a9d8f;
}

.tsc-tab--logout {
  margin-left: auto;
  color: #94a3b8;
  font-weight: 500;
}

.tsc-tab--logout:hover {
  color: #dc2626;
}

/* ----- Tab Content ----- */
.tsc-tab-content {
  display: none;
}

.tsc-tab-content.active {
  display: block;
  animation: tscFadeIn 0.2s ease;
}

@keyframes tscFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----- Portal Cards ----- */
.tsc-portal-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.tsc-portal-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem;
}

.tsc-portal-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 1.25rem;
}

/* ----- Status Header with Badge ----- */
.tsc-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tsc-portal-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tsc-portal-badge.--pending {
  background: #fef3c7;
  color: #92400e;
}

.tsc-portal-badge.--approved {
  background: #d1fae5;
  color: #065f46;
}

.tsc-portal-badge.--denied {
  background: #fee2e2;
  color: #991b1b;
}

.tsc-portal-badge.--cancelled {
  background: #f1f5f9;
  color: #64748b;
}

/* ----- Detail Grid ----- */
.tsc-portal-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 1.25rem;
}

.tsc-portal-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tsc-detail-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5f8a84;
}

.tsc-detail-value {
  font-size: 0.95rem;
  color: #1e293b;
}

/* ----- Notices ----- */
.tsc-portal-notice {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.93rem;
  line-height: 1.5;
}

.tsc-portal-notice.--info {
  background: #f0f7ff;
  border: 1px solid #93c5fd;
  color: #1e3a5f;
}

.tsc-portal-notice.--success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.tsc-portal-notice.--error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.tsc-portal-notice.--cancelled {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
}

/* ----- Map Container ----- */
.tsc-portal-map-container {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 1.25rem;
  border: 2px solid #d5e5e2;
  border-radius: 10px;
  overflow: hidden;
}

.tsc-portal-map-img {
  display: block;
  width: 100%;
  height: auto;
}

.tsc-portal-map-marker {
  position: absolute;
  transform: translate(-50%, -100%);
}

.tsc-portal-map-marker span {
  display: inline-block;
  background: #2a9d8f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  white-space: nowrap;
}

.tsc-portal-map-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #2a9d8f;
}

/* ----- Spot Info ----- */
.tsc-portal-spot-info {
  margin-bottom: 1.25rem;
}

.tsc-portal-spot-badge {
  display: inline-block;
  background: #f0faf8;
  color: #2a9d8f;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 8px;
  border: 2px solid #d5e5e2;
  margin-bottom: 8px;
}

.tsc-portal-spot-desc {
  font-size: 0.93rem;
  color: #475569;
  margin: 6px 0 0;
}

/* ----- Portal Buttons ----- */
.tsc-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}

.tsc-portal-btn.--primary {
  background: #2a9d8f;
  color: #fff;
  box-shadow: 0 1px 4px rgba(42,157,143,.3);
}

.tsc-portal-btn.--primary:hover {
  background: #238b7e;
  box-shadow: 0 3px 8px rgba(42,157,143,.35);
  transform: translateY(-1px);
  color: #fff;
}

.tsc-portal-btn.--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.tsc-portal-btn.--secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.tsc-portal-btn.--secondary:hover {
  background: #e2e8f0;
}

.tsc-portal-btn.--full {
  width: 100%;
  justify-content: center;
}

/* ----- Portal Form Fields ----- */
.tsc-portal-form .tsc-portal-field {
  margin-bottom: 1rem;
}

.tsc-portal-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.tsc-portal-form input[type="text"],
.tsc-portal-form input[type="url"],
.tsc-portal-form input[type="email"],
.tsc-portal-form textarea {
  display: block;
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 0.93rem;
  font-family: inherit;
  color: #1a1a2e;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tsc-portal-form input:focus,
.tsc-portal-form textarea:focus {
  border-color: #2a9d8f;
  outline: none;
  box-shadow: 0 0 0 3px rgba(42,157,143,.15);
}

.tsc-portal-form textarea {
  resize: vertical;
  min-height: 100px;
}

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

@media (max-width: 600px) {
  .tsc-portal-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.tsc-portal-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.tsc-portal-save-status {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ----- Upload Areas ----- */
.tsc-portal-upload-preview {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}

.tsc-portal-upload-preview img {
  max-width: 160px;
  max-height: 100px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.tsc-portal-upload-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

/* ----- Login Card ----- */
.tsc-portal-login-card {
  max-width: 440px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.tsc-portal-login-icon {
  margin-bottom: 12px;
}

.tsc-portal-login-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 8px;
}

.tsc-portal-login-card > p {
  font-size: 0.93rem;
  color: #64748b;
  margin: 0 0 1.5rem;
  line-height: 1.55;
}

.tsc-portal-login-card .tsc-portal-field {
  text-align: left;
  margin-bottom: 1rem;
}

.tsc-portal-login-card .tsc-portal-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.tsc-portal-login-card .tsc-portal-field input {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a2e;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tsc-portal-login-card .tsc-portal-field input:focus {
  border-color: #2a9d8f;
  outline: none;
  box-shadow: 0 0 0 3px rgba(42,157,143,.15);
}

/* ----- Vendor Directory ----- */
.tsc-directory-wrap {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.tsc-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .tsc-directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .tsc-directory-grid {
    grid-template-columns: 1fr;
  }
}

.tsc-directory-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tsc-directory-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.tsc-directory-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #f0faf8 0%, #d5e5e2 100%);
}

.tsc-directory-cover-placeholder {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #f0faf8 0%, #d5e5e2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tsc-directory-cover-placeholder svg {
  opacity: 0.3;
}

.tsc-directory-body {
  padding: 16px 20px 20px;
  position: relative;
}

.tsc-directory-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 3px solid #fff;
  object-fit: cover;
  position: absolute;
  top: -28px;
  left: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  background: #fff;
}

.tsc-directory-body.--has-logo {
  padding-top: 40px;
}

.tsc-directory-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}

.tsc-directory-type {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2a9d8f;
  margin: 0 0 8px;
}

.tsc-directory-bio {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 12px;
}

.tsc-directory-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.tsc-directory-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
}

.tsc-directory-links a:hover {
  background: #2a9d8f;
  color: #fff;
}

.tsc-directory-links a svg {
  width: 16px;
  height: 16px;
}

.tsc-directory-website {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2a9d8f;
  text-decoration: none;
}

.tsc-directory-website:hover {
  text-decoration: underline;
}

.tsc-directory-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
  font-size: 1rem;
}

/* ----- Portal: Contact Rows ----- */
.tsc-portal-contact-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px 8px;
  margin-bottom: 10px;
  position: relative;
  transition: box-shadow 0.2s;
}

.tsc-portal-contact-row:hover {
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.tsc-portal-contact-row .tsc-portal-field-row {
  gap: 10px;
  align-items: end;
}

.tsc-portal-contact-row .tsc-remove-contact {
  padding: 6px 12px;
  font-size: 1.1rem;
  line-height: 1;
  min-width: auto;
  color: #dc2626;
  border-color: #fecaca;
  background: #fff;
}

.tsc-portal-contact-row .tsc-remove-contact:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

#tsc-contacts-list:empty::after {
  content: "No additional contacts added yet.";
  display: block;
  color: #94a3b8;
  font-size: 0.875rem;
  padding: 12px 0;
}

/* ----- Portal Responsive ----- */
@media (max-width: 640px) {
  .tsc-portal-card {
    padding: 1.25rem 1rem;
  }

  .tsc-portal-tabs {
    gap: 2px;
  }

  .tsc-tab {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .tsc-tab--logout {
    margin-left: 0;
  }

  .tsc-portal-login-card {
    padding: 1.75rem 1.25rem;
    margin: 1rem auto;
  }

  .tsc-status-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tsc-portal-contact-row .tsc-portal-field-row {
    grid-template-columns: 1fr !important;
  }

  .tsc-portal-contact-row .tsc-remove-contact {
    width: 100%;
    text-align: center;
  }
}
