.master-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.master-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
}

.master-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
}

.master-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
}

.master-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.master-panel {
  padding: 0;
  overflow: hidden;
}

.master-panel .nav-tabs {
  padding: 12px 16px 0;
  border-bottom: 1px solid #eef2ff;
}

.master-panel .tab-content {
  padding: 16px;
}

.master-table {
  margin: 0;
  font-size: 12px;
}

.master-table th {
  background: #f8f9fa;
  font-weight: 700;
  white-space: nowrap;
}

.master-table td,
.master-table th {
  vertical-align: middle;
  padding: 8px 10px;
}

.master-company-row td {
  background: #eef2ff;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-top: 2px solid #c7d2fe;
  border-bottom: 1px solid #dbe4ff;
}

.master-company-divider td {
  padding: 0;
  height: 14px;
  background: #f8fafc;
  border-top: 0;
  border-bottom: 3px solid #e5e7eb;
}

.master-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.master-badge.active {
  background: #dcfce7;
  color: #166534;
}

.master-badge.inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.master-settings-form {
  max-width: 560px;
}

.master-settings-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0;
}

.master-settings-divider {
  margin: 20px 0 4px;
  border-top: 1px solid #e5e7eb;
}

.master-settings-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
}

.master-settings-desc {
  font-size: 0.88rem;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.5;
}

.master-settings-field .form-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #374151;
  margin-bottom: 6px;
}

.master-settings-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.master-settings-input-row .form-control {
  max-width: 180px;
  font-weight: 700;
}

.master-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.master-settings-grid .form-control {
  max-width: 180px;
  font-weight: 700;
}

.master-settings-unit {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6b7280;
}

.master-settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.master-save-btn {
  background-color: #198754;
  border-color: #198754;
  color: #fff;
  font-weight: 700;
  min-width: 88px;
}

.master-save-btn:hover,
.master-save-btn:focus {
  background-color: #157347;
  border-color: #146c43;
  color: #fff;
}

.master-save-btn:disabled {
  opacity: 0.7;
}

.master-settings-status {
  font-size: 0.82rem;
  font-weight: 600;
}

.master-settings-status.is-success {
  color: #166534;
}

.master-settings-status.is-error {
  color: #b91c1c;
}

.master-home-base-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.master-home-base-company-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.master-home-base-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.master-home-base-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.master-home-assignment-company {
  margin-bottom: 14px;
}

.master-no-col {
  width: 56px;
  min-width: 56px;
  text-align: center;
  white-space: nowrap;
}

.master-point-col {
  min-width: 100px;
}

.master-point-cell {
  min-width: 100px;
}

.master-point-cell .master-product-point-input {
  width: 72px;
  font-weight: 700;
}

.master-products-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
}
