/* =========================================================
   TECHFIT PLM UI STANDARD V1
   Shared Components
   ========================================================= */

body.tf-ui-v1 .tf-page-title {
  margin: 0;
  color: var(--tf-text-main);
  font-size: var(--tf-font-page-title);
  font-weight: var(--tf-weight-title);
  line-height: var(--tf-line-tight);
}

body.tf-ui-v1 .tf-page-kicker {
  color: var(--tf-text-main);
  font-size: var(--tf-font-label);
  font-weight: var(--tf-weight-label);
  letter-spacing: var(--tf-letter-eyebrow);
  text-transform: uppercase;
}

body.tf-ui-v1 .tf-card-title {
  margin: 0;
  color: var(--tf-text-main);
  font-size: var(--tf-font-card-title);
  font-weight: var(--tf-weight-title);
  line-height: var(--tf-line-tight);
}

body.tf-ui-v1 .tf-section-title {
  margin: 0;
  color: var(--tf-text-main);
  font-size: var(--tf-font-lg);
  font-weight: var(--tf-weight-title);
  line-height: var(--tf-line-tight);
}

body.tf-ui-v1 .tf-label {
  color: var(--tf-text-label);
  font-size: var(--tf-font-label);
  font-weight: var(--tf-weight-label);
  letter-spacing: var(--tf-letter-label);
  text-transform: uppercase;
}

body.tf-ui-v1 .tf-value {
  color: var(--tf-text-main);
  font-size: var(--tf-font-md);
  font-weight: var(--tf-weight-regular);
}

body.tf-ui-v1 .tf-value-lg {
  color: var(--tf-text-main);
  font-size: var(--tf-font-lg);
  font-weight: var(--tf-weight-regular);
}

body.tf-ui-v1 .tf-muted {
  color: var(--tf-text-muted);
  font-size: var(--tf-font-sm);
  font-weight: var(--tf-weight-regular);
}

/* Top shell / header */
body.tf-ui-v1 .tf-topbar,
body.tf-ui-v1 .plm-topbar,
body.tf-ui-v1 .plm-top-shell,
body.tf-ui-v1 .top-shell,
body.tf-ui-v1 header {
  font-family: var(--tf-font-family);
}

body.tf-ui-v1 .tf-topbar {
  min-height: var(--tf-header-height);
  display: flex;
  align-items: center;
  gap: var(--tf-space-4);
  padding: 0 var(--tf-page-padding);
  background: var(--tf-bg-page);
  border-bottom: 1px solid var(--tf-border);
}

body.tf-ui-v1 .tf-brand-block {
  min-width: 240px;
}

body.tf-ui-v1 .tf-brand-kicker {
  display: block;
  color: var(--tf-text-main);
  font-size: var(--tf-font-label);
  font-weight: var(--tf-weight-label);
  letter-spacing: var(--tf-letter-eyebrow);
  text-transform: uppercase;
}

body.tf-ui-v1 .tf-brand-title {
  display: block;
  color: #000000;
  font-size: var(--tf-font-page-title);
  font-weight: var(--tf-weight-regular);
  line-height: var(--tf-line-tight);
}

body.tf-ui-v1 .tf-nav {
  display: flex;
  align-items: center;
  gap: var(--tf-space-3);
  flex-wrap: wrap;
}

body.tf-ui-v1 .tf-user-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--tf-space-3);
}

/* Pills */
body.tf-ui-v1 .tf-pill,
body.tf-ui-v1 a.tf-pill,
body.tf-ui-v1 button.tf-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tf-pill-height);
  padding: 0 18px;
  border: 1px solid var(--tf-border-blue);
  border-radius: var(--tf-radius-pill);
  background: var(--tf-bg-card);
  color: var(--tf-text-main);
  font-size: var(--tf-font-md);
  font-weight: var(--tf-weight-button);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

body.tf-ui-v1 .tf-pill:hover {
  background: var(--tf-bg-soft-blue);
  border-color: var(--tf-border-blue-strong);
}

body.tf-ui-v1 .tf-pill:active {
  transform: translateY(1px);
}

body.tf-ui-v1 .tf-pill-sm {
  min-height: var(--tf-pill-height-sm);
  padding: 0 14px;
  font-size: var(--tf-font-sm);
}

body.tf-ui-v1 .tf-pill-active,
body.tf-ui-v1 .tf-pill-primary {
  background: var(--tf-primary);
  border-color: var(--tf-primary);
  color: var(--tf-text-inverse);
}

body.tf-ui-v1 .tf-pill-active:hover,
body.tf-ui-v1 .tf-pill-primary:hover {
  background: var(--tf-primary-hover);
  border-color: var(--tf-primary-hover);
}

body.tf-ui-v1 .tf-pill-danger {
  border-color: var(--tf-border-danger);
  background: #fff7f6;
  color: var(--tf-text-danger);
}

body.tf-ui-v1 .tf-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #bfdbfe;
  border-radius: var(--tf-radius-pill);
  background: var(--tf-bg-blue-pill);
  color: var(--tf-blue);
  font-size: var(--tf-font-sm);
  font-weight: var(--tf-weight-regular);
}

/* Cards */
body.tf-ui-v1 .tf-card {
  background: var(--tf-bg-card);
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius-lg);
  box-shadow: var(--tf-shadow-card);
  overflow: hidden;
}

body.tf-ui-v1 .tf-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tf-space-3);
  padding: 12px 16px;
  background: var(--tf-bg-card-soft);
  border-bottom: 1px solid var(--tf-border-soft);
}

body.tf-ui-v1 .tf-card-body {
  padding: var(--tf-card-padding);
}

/* Summary / status */
body.tf-ui-v1 .tf-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tf-space-4);
  padding: 18px;
  background: var(--tf-bg-card);
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius-lg);
}

body.tf-ui-v1 .tf-summary-title {
  margin: 0;
  color: var(--tf-text-main);
  font-size: var(--tf-font-card-title);
  font-weight: var(--tf-weight-title);
}

body.tf-ui-v1 .tf-summary-subtitle {
  margin-top: 4px;
  color: var(--tf-text-body);
  font-size: var(--tf-font-md);
}

body.tf-ui-v1 .tf-status {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 118px;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid var(--tf-border-blue);
  border-radius: var(--tf-radius-md);
  background: var(--tf-bg-card-soft);
  color: var(--tf-text-main);
}

body.tf-ui-v1 .tf-status-success {
  background: var(--tf-bg-green-soft);
  border-color: var(--tf-border-green);
  color: var(--tf-text-success);
}

body.tf-ui-v1 .tf-status-warning {
  background: #fffaf0;
  border-color: var(--tf-border-warning);
  color: var(--tf-text-warning);
}

body.tf-ui-v1 .tf-status-danger {
  background: #fff7f6;
  border-color: var(--tf-border-danger);
  color: var(--tf-text-danger);
}

body.tf-ui-v1 .tf-status-label {
  color: var(--tf-text-label);
  font-size: var(--tf-font-label);
  font-weight: var(--tf-weight-label);
  letter-spacing: var(--tf-letter-label);
  line-height: var(--tf-line-tight);
  text-transform: uppercase;
}

body.tf-ui-v1 .tf-status-value {
  margin-top: 3px;
  color: inherit;
  font-size: var(--tf-font-md);
  font-weight: var(--tf-weight-regular);
  line-height: var(--tf-line-tight);
}

/* Fields */
body.tf-ui-v1 .tf-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 0;
}

body.tf-ui-v1 .tf-field-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 39px;
  border-bottom: 1px solid var(--tf-border-soft);
}

body.tf-ui-v1 .tf-field-row:last-child {
  border-bottom: none;
}

/* Tables */
body.tf-ui-v1 .tf-table-wrap {
  width: 100%;
  overflow-x: auto;
}

body.tf-ui-v1 .tf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--tf-font-md);
  color: var(--tf-text-main);
}

body.tf-ui-v1 .tf-table th {
  height: var(--tf-table-row-height);
  padding: 8px 10px;
  border-bottom: 1px solid var(--tf-border);
  background: var(--tf-bg-card-soft);
  color: var(--tf-text-label);
  font-size: var(--tf-font-label);
  font-weight: var(--tf-weight-label);
  letter-spacing: var(--tf-letter-label);
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

body.tf-ui-v1 .tf-table td {
  height: var(--tf-table-row-height);
  padding: 8px 10px;
  border-bottom: 1px solid var(--tf-border-soft);
  color: var(--tf-text-main);
  font-size: var(--tf-font-md);
  font-weight: var(--tf-weight-regular);
  vertical-align: middle;
}

body.tf-ui-v1 .tf-table tr:hover td {
  background: var(--tf-bg-soft-blue);
}

/* Forms */
body.tf-ui-v1 .tf-input,
body.tf-ui-v1 .tf-select,
body.tf-ui-v1 .tf-textarea {
  width: 100%;
  min-height: var(--tf-input-height);
  padding: 0 12px;
  border: 1px solid var(--tf-border-blue);
  border-radius: var(--tf-radius-md);
  background: var(--tf-bg-card);
  color: var(--tf-text-main);
  font-size: var(--tf-font-md);
  font-weight: var(--tf-weight-regular);
  outline: none;
}

body.tf-ui-v1 .tf-textarea {
  min-height: 96px;
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
}

body.tf-ui-v1 .tf-input:focus,
body.tf-ui-v1 .tf-select:focus,
body.tf-ui-v1 .tf-textarea:focus {
  border-color: var(--tf-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

@media (max-width: 900px) {
  body.tf-ui-v1 .tf-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  body.tf-ui-v1 .tf-user-actions {
    margin-left: 0;
  }

  body.tf-ui-v1 .tf-summary-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  body.tf-ui-v1 .tf-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body.tf-ui-v1 .tf-pill {
    min-height: 38px;
    padding: 0 14px;
  }

  body.tf-ui-v1 .tf-field-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 9px 0;
  }

  body.tf-ui-v1 .tf-status {
    min-width: 100%;
  }
}

/* TECHFIT_UI_V2_A2:COMPONENTS:START */
/*
 * TECHFIT UI V2 — Style Arcade shared component foundation
 * All overrides remain scoped to .tf-ui-v2-style-arcade.
 */
.tf-ui-v2-style-arcade .tf-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--tf-text);
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.tf-ui-v2-style-arcade .tf-nav-link:hover,
.tf-ui-v2-style-arcade .tf-nav-link:focus-visible {
  color: var(--tf-text-strong);
}

.tf-ui-v2-style-arcade .tf-nav-link.is-active,
.tf-ui-v2-style-arcade .tf-nav-link[aria-current="page"] {
  color: var(--tf-text-strong);
  font-weight: 600;
}

.tf-ui-v2-style-arcade .tf-toolbar-btn,
.tf-ui-v2-style-arcade .tf-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--tf-control-border);
  border-radius: var(--tf-radius-pill);
  background: var(--tf-control-bg);
  color: var(--tf-text-strong);
  font-family: var(--tf-font-family);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.tf-ui-v2-style-arcade .tf-toolbar-btn:hover,
.tf-ui-v2-style-arcade .tf-pill:hover {
  border-color: var(--tf-border);
  background: var(--tf-control-bg-active);
}

.tf-ui-v2-style-arcade .tf-toolbar-btn:focus-visible,
.tf-ui-v2-style-arcade .tf-pill:focus-visible {
  outline: 2px solid var(--tf-text-soft);
  outline-offset: 2px;
}

.tf-ui-v2-style-arcade .tf-toolbar-btn:disabled,
.tf-ui-v2-style-arcade .tf-pill:disabled,
.tf-ui-v2-style-arcade .tf-pill.is-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.tf-ui-v2-style-arcade .tf-pill-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
}

.tf-ui-v2-style-arcade .tf-pill-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--tf-control-border);
  border-radius: var(--tf-radius-pill);
  background: var(--tf-control-bg);
  color: var(--tf-text);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}

.tf-ui-v2-style-arcade .tf-segmented {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  border: 1px solid var(--tf-control-border);
  border-radius: var(--tf-radius-md);
  background: var(--tf-control-bg);
}

.tf-ui-v2-style-arcade .tf-segmented .tf-pill {
  min-height: 36px;
  border: 0;
  border-radius: var(--tf-radius-sm);
  background: transparent;
}

.tf-ui-v2-style-arcade .tf-segmented .tf-pill.is-active,
.tf-ui-v2-style-arcade .tf-segmented .tf-pill[aria-selected="true"] {
  background: var(--tf-control-bg-active);
  color: var(--tf-text-strong);
}

.tf-ui-v2-style-arcade .tf-card {
  border: 1px solid var(--tf-border-soft);
  border-radius: var(--tf-radius-lg);
  background: var(--tf-surface);
  box-shadow: none;
}

.tf-ui-v2-style-arcade .tf-product-card {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tf-text);
  box-shadow: none;
}

.tf-ui-v2-style-arcade .tf-product-card.is-selected,
.tf-ui-v2-style-arcade .tf-product-card[aria-selected="true"] {
  border-radius: var(--tf-radius-md);
  background: var(--tf-surface-muted);
}

.tf-ui-v2-style-arcade .tf-product-image {
  display: block;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  background: var(--tf-surface-muted);
  object-fit: cover;
}

.tf-ui-v2-style-arcade .tf-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tf-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
}

/*
 * Dot is opt-in to avoid changing existing V1 status badges.
 * Usage: class="tf-status tf-status-dot"
 */
.tf-ui-v2-style-arcade .tf-status.tf-status-dot::before {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: var(--tf-radius-pill);
  background: var(--tf-status-on-order);
  content: "";
}

.tf-ui-v2-style-arcade .tf-status.tf-status-dot.is-cancelled::before {
  background: var(--tf-status-cancelled);
}

.tf-ui-v2-style-arcade .tf-status.tf-status-dot.is-plan::before {
  background: var(--tf-status-plan);
}

.tf-ui-v2-style-arcade .tf-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--tf-text);
}

.tf-ui-v2-style-arcade .tf-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--tf-border);
  color: var(--tf-text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
}

.tf-ui-v2-style-arcade .tf-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--tf-border-soft);
  color: var(--tf-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .tf-ui-v2-style-arcade .tf-nav-link {
    min-height: 40px;
    padding: 0 10px;
    font-size: 16px;
  }

  .tf-ui-v2-style-arcade .tf-toolbar-btn,
  .tf-ui-v2-style-arcade .tf-pill {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }

  .tf-ui-v2-style-arcade .tf-product-image {
    max-width: none;
  }

  .tf-ui-v2-style-arcade .tf-table th {
    font-size: 12px;
  }

  .tf-ui-v2-style-arcade .tf-table td {
    font-size: 14px;
  }
}
/* TECHFIT_UI_V2_A2:COMPONENTS:END */

/* SM34A_R6D_DEPENDENCY_AWARE_DELETE_UX_CSS_START */

/*
 * Shared disabled state for TechFit pill controls.
 * Uses existing Style Arcade tokens and reusable classes.
 */
.tf-ui-v2-style-arcade .tf-pill[disabled],
.tf-ui-v2-style-arcade .tf-pill[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: 1 !important;
  background: var(--tf-control-bg) !important;
  border-color: var(--tf-control-border) !important;
  color: var(--tf-text-muted) !important;
  box-shadow: none !important;
}

.tf-ui-v2-style-arcade
.fr-card-actions-r3mb
.tf-pill {
  min-height: 34px !important;
  padding: 0 14px !important;
  border-radius: var(--tf-radius-pill) !important;
  border-color: var(--tf-control-border) !important;
  background: var(--tf-control-bg) !important;
  color: var(--tf-text-strong) !important;
  font-family: var(--tf-font-family) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.tf-ui-v2-style-arcade
.tf-pill-badge[data-sm34a-delete-state-label] {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-height: 28px !important;
  margin: 9px 0 0 !important;
  padding: 0 10px !important;
  border: 1px solid var(--tf-border-soft) !important;
  border-radius: var(--tf-radius-pill) !important;
  background: var(--tf-surface-muted) !important;
  color: var(--tf-text-muted) !important;
  font-family: var(--tf-font-family) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

.tf-ui-v2-style-arcade
.tf-pill-badge[data-sm34a-delete-state="eligible"] {
  background: var(--tf-control-bg-active) !important;
  color: var(--tf-text-strong) !important;
}

.tf-ui-v2-style-arcade
[data-sm34a-delete-state="dependency-blocked"] {
  cursor: not-allowed !important;
}

/* SM34A_R6D_DEPENDENCY_AWARE_DELETE_UX_CSS_END */



/* TECHFIT-UI-V2.2-SHARED-COMPACT-CONTROLS-START */
/* Applies only to shared TechFit .tf-pill classes. Legacy .btn/.button/nav-btn/filter-btn are intentionally unchanged. */
body.tf-ui-v1 .tf-pill,
body.tf-ui-v1 a.tf-pill,
body.tf-ui-v1 button.tf-pill,
.tf-ui-v2-style-arcade .tf-toolbar-btn,
.tf-ui-v2-style-arcade .tf-pill {
  min-height:34px;
  padding-left:14px;
  padding-right:14px;
  gap:6px;
  font-size:13px;
}
body.tf-ui-v1 .tf-pill-sm,
.tf-ui-v2-style-arcade .tf-pill-sm {
  min-height:32px;
  padding-left:12px;
  padding-right:12px;
  font-size:12px;
}
.tf-ui-v2-style-arcade .tf-segmented { padding:2px; }
.tf-ui-v2-style-arcade .tf-segmented .tf-pill { min-height:30px; }
@media (max-width:640px), (pointer:coarse) {
  body.tf-ui-v1 .tf-pill,
  body.tf-ui-v1 a.tf-pill,
  body.tf-ui-v1 button.tf-pill,
  .tf-ui-v2-style-arcade .tf-toolbar-btn,
  .tf-ui-v2-style-arcade .tf-pill { min-height:38px; }
  body.tf-ui-v1 .tf-pill-sm,
  .tf-ui-v2-style-arcade .tf-pill-sm { min-height:36px; }
  .tf-ui-v2-style-arcade .tf-segmented .tf-pill { min-height:34px; }
}
/* TECHFIT-UI-V2.2-SHARED-COMPACT-CONTROLS-END */
